Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 318 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 318 Bytes

nim-curry: Easy currying library for Nim

You can curry functions by simply putting {.curry.}.

Example

import nim_curry

proc f(foo, bar = 100; baz: float): float {.curry.} =
  return (foo + bar).float * baz

echo f(10)(20)(2.5) # => 75.0
echo f()(2)(0.1)    # => 10.2
echo f()()(0.0)     # =>  0.0