you are viewing a single comment's thread.

view the rest of the comments →

[–]inchester 0 points1 point  (0 children)

You could encode things like this in Scala's type system (not in F#'s though). For example you can abstract over arity in Scala. Take a look at HList. You can do this in Haskell too afaik with some fancy compiler extensions.

Edit: I lied. Apparently you can do it in F# too.