Jump to content

Currying: Difference between revisions

Added Hy
(Added Hy)
Line 502:
Prelude> :type nested_plus
nested_plus :: Integer -> Integer -> Integer
 
=={{header|Hy}}==
<lang hy>(defn addN [n]
(fn [x]
(+ x n)))</lang>
<lang hy>=> (setv add2 (addN 2))
=> (add2 7)
9
 
=> ((addN 3) 4)
7</lang>
 
==Icon and {{header|Unicon}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.