-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
The following code has to name two functions.
pure fn hash(x: @str) -> uint { str::hash(*x) }
pure fn eq(x: @str, y: @str) -> uint { str::eq(*x,*y) }
ret hashmap(hash, eq);
It'd be nice if we could write:
ret hashmap(pure {|x: @str|str::hash(*x)}, pure {|x,y|str::eq(*x,*y)});
...or even (with type inference, if possible):
ret hashmap({|x: @str|str::hash(*x)}, {|x,y|str::eq(*x,*y)});
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.