glathoud
2/24/2016 5:53:00 AM
On Saturday, February 20, 2016 at 2:59:52 PM UTC+1, Ben Bacarisse wrote:
> glathoud <glathoud@yahoo.fr> writes:
> <snip>
> > Side note about lambdas: it would be nice to be able to write some
> > without variables at all. OCaml has an interesting notation where one
> > can wrap an operator + into a function (+)
>
> Haskell has that too, and it came (at least in the case of Haskell),
> from Miranda designed by David Turner. He may have got it from a 1973
> dissertation by Wile and (like so many such things) it probably has even
> older roots in mathematical logic.
>
> Haskell (and Miranda) can go both ways. (+) is a function make from an
> operator, but given a function like mod, you can make an operator from
> it using `...`:
>
> 95 `mod` 10
>
> is 5. And you can combine the two. Since operators permit sections
> using either operand it can be handy to write (`mod` 10) for the "modulo
> 10" function.
>
> <snip>
> --
> Ben.
Thanks for giving the big picture about this topic. I did not know all that!
Best regards,
Guillaume