Open ConorOBrien-Foxx opened 7 years ago
Another idea: (N ~ f)(*a)
is the same as calling f(*a,...*a)
where *a
is repeated N
times.
Currying: a => b => a+b
=> f(a, b)
IIRC
Memoise: should be easy to do.
Memoize is easy but it's another thing if you don't want to use a hell ton of memory. Cyrrying is the otherway btw
Some more revisions/additions:
F * n
is function repetition. E.g., (F*3)(4) = F(F(F(4)))
F ** n
is function argument repetition. E.g., (F**2)(2,3) = F(2,3,2,3)
@ConorOBrien-Foxx can I plz make another porpoisal with that? ;3 (I will credit you)
porpisal
you spelt porpoisal wrong :P
@vihanb fixed
@schas002 uh, okay?
There should be an operator that curries a function. Perhaps
~:
?A memoizing function/operator. E.g.:
Dynamic programing FTW!
I wonder if any more should be considered.