Bonjour café,

A small puzzle:

Consider the function inTwain that splits a list of even length evenly into two sublists:

> inTwain "Hello world!"
("Hello ","world!")

Is it possible to implement inTwain such that the recursion is done by one of the standard list folds?

Is there a general way to tell if a problem can be expressed as a fold?

Thank you,

Martijn.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to