Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. life with Hutton 2ed (Sylvester Hazel)
----------------------------------------------------------------------
Message: 1
Date: Sat, 16 Jun 2018 22:23:36 +0200
From: Sylvester Hazel <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] life with Hutton 2ed
Message-ID:
<cagstzkheqeovbsaoz_vlwuftahfldzjrrmbgqge5rnw20uo...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I wonder why life/10.8 runs nonsensically on my PC even with
Language.Haskell.HsColour.ANSI import?
These cls and goto reappear in 11.7 that spoil the pleasure of
understanding.
Also putGrid/11.4 is unintuitive backsword engineering concoction that
teaches nothing, while it can be very intuitively written: putGrid g =
sequence_ [putStrLn j| j<-weave [' ','|',' ','|',' '] (interleave
(replicate 6 '-') [(interleave '|' i)| i<-g])]
interleave :: a->[a]->[a]
interleave x [] = []
interleave x [y] = [y]
interleave x (y:ys)= y:x:interleave x ys
weave :: a->[a]->[a]
weave x [] = [x]
weave x [y] = x:[y,x]
weave x (y:ys)= x:y:weave x ys
Prelude> putGrid [[' ','O','O'],['O','X','O'],['X','X','X']]
| |
|O|O
| |
------
| |
O|X|O
| |
------
| |
X|X|X
| |
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20180616/ae1cee57/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 120, Issue 8
*****************************************