[Haskell-cafe] A small puzzle: inTwain as function of foldr
Sittampalam, Ganesh
ganesh.sittampalam at credit-suisse.com
Thu Jun 4 10:32:45 EDT 2009
Martijn van Steenbergen wrote:
> 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?
Does this help? http://www.brics.dk/RS/02/12/BRICS-RS-02-12.pdf
Ganesh
===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================
More information about the Haskell-Cafe
mailing list