Yes! Well, more or less. I guess it all depends on what you want from currying. Like, there’s no automatic currying like in Haskell or Elm. But, you can get a reference to a method, and then “curry” it (I’m not sure if there’s a difference between that and partial application)
Here’s an example:
# This is a function that adds two things
def add(x, y)
x + y
end
# With this we get a function that adds two integers
add_function = ->add(Int32, Int32)
p! add_function.call(1, 2)
# Now we get the add function but with the first argument fixed to 10
add10 = add_function.partial(10)
p! add10.call(5)
Aa ok i see. Well for reference i was looking at this implementation of parser combinators:
I thought it was interesting and thought it might be interesting to try replicating in crystal. But it uses partial application in js. This was the context.
Will play around with the suggested approach. Ir maybe ill find a better approach.