Andrew Chambersadd mktempat to stdb44b19310 years agoHistory
22 lines · 376 B · Text
RawDownload
use "alloc" pkg std =	generic mk	: (val : @a -> @a#);; /* Takes a value, and heapifies it. FIXME: This depends on inlining and copy propagationin order to be efficient. Neither of those arecurrently implemented. That means that this functionis not efficient. It's still damn convenient, though, so it's in.*/generic mk = {val	var p 	p = alloc()	p# = val	-> p}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t