in reply to RFC: A Perlesque Introduction to Haskell, Part One (DRAFT)

I've always wanted to see an implementation of Inline::Haskell (a la Inline::C).
And I figured functions could return references to tied file handles to take care of (possibly infinite) lazy lists.

-- All code is 100% tested and functional unless otherwise noted.

$fh=haskell_func(); while(<$fh>) { ...etc... } @foo=map $_*2, <$fh>; __HASKELL__ haskell_func = primes [2..] where primes [x:xs] = x:primes (filter (\n->(mod n x)/=0) xs)

-- All code is 100% tested and functional unless otherwise noted.

In Section
Meditations

Comment onInline::HaskellDownloadCode