[clean-list] Partial application of list constructor

j.romildo at gmail.com j.romildo at gmail.com
Tue Jun 20 18:03:00 MEST 2006


Hello.

How can one do a partial application of the non-nullary list constructor
in Clean?

In Haskell one can write:

  f x = (:) (x,x)
  main = print (f 4 [(1,2),(3,0)])

And in Clean, how one would write the function f using a partial
application of the list constructor?

f is equivalent to the Clean function

  g x ys = [(x,x) : ys]

Regards.

Romildo


More information about the clean-list mailing list