<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.dotnetzone.gr/cs/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="el"><title type="html">Thoughts and Code</title><subtitle type="html">Logic, art, coding...</subtitle><id>http://www.dotnetzone.gr/cs/blogs/palladin/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.dotnetzone.gr/cs/blogs/palladin/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.20423.1">Community Server</generator><updated>2009-03-15T12:33:00Z</updated><entry><title>Reactive Monads</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/02/27/reactive-monads.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="15596" href="http://www.dotnetzone.gr/cs/blogs/palladin/attachment/57356.ashx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/02/27/reactive-monads.aspx</id><published>2010-02-27T12:06:00Z</published><updated>2010-02-27T12:06:00Z</updated><content type="html">&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/en/9/98/ErikMeijer.jpg" style="width:400px;"&gt;&lt;/div&gt;&lt;div&gt;Το Rx είναι το νέο δημιούργημα του Erik Meijer, και μετά από μήνες ενασχόλησης μαζί του, νομίζω ότι είναι απλά 'a work of genius'.&lt;/div&gt;&lt;div&gt;Αυτό που κάνει είναι να δρα ως compositional glue για events, asynchronous calls &amp;nbsp;και γενικά για push based computations.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Κατεβάστε το από &lt;a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx"&gt;εδώ &lt;/a&gt;και αρχίστε να εξερευνείτε τις δυνατότητές του (You will be amazed).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Ως ένα παράδειγμα της μαγείας του, έγραψα ένα κλασσικό mouse move recording and playback.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre;"&gt;	&lt;/span&gt;    var mouseMoveObservable &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; Observable.Merge(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; Control[] { &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;, recordButton, stopButton, playButton }
                                                    &lt;span class="Apple-tab-span" style="white-space:pre;"&gt;		&lt;/span&gt;.Select(control =&amp;gt; Observable.FromEvent&amp;lt;MouseEventArgs&amp;gt;(control, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"MouseMove"&lt;/span&gt;)));

            ReplaySubject&amp;lt;TimeInterval&amp;lt;IEvent&amp;lt;MouseEventArgs&amp;gt;&amp;gt;&amp;gt; replayObservable &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;null&lt;/span&gt;;
            Observable.FromEvent&amp;lt;EventArgs&amp;gt;(recordButton, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Click"&lt;/span&gt;).ObserveOnWindowsForms().Subscribe(_ =&amp;gt;
            {
                stopButton.Enabled &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;; recordButton.Enabled &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;;
                replayObservable &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; mouseMoveObservable.TimeInterval().Record();
                replayObservable.ObserveOnWindowsForms().Subscribe(time =&amp;gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;this&lt;/span&gt;.Text &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; String.Format(&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"{0},{1}"&lt;/span&gt;, time.Value.EventArgs.X, time.Value.EventArgs.Y));
            });

            Observable.FromEvent&amp;lt;EventArgs&amp;gt;(stopButton, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Click"&lt;/span&gt;).ObserveOnWindowsForms().Subscribe(_ =&amp;gt;
            {
                replayObservable.Dispose();
                stopButton.Enabled &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;; playButton.Enabled &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;;
            });
            
            Observable.FromEvent&amp;lt;EventArgs&amp;gt;(playButton, &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Click"&lt;/span&gt;).ObserveOnWindowsForms().Subscribe(_ =&amp;gt;
            {
                playButton.Enabled &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;;
                var playObservable &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; replayObservable.ToEnumerable()
                                     .Aggregate(Observable.Return(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; Unit()),
                                                (accObservable, timeMouse) =&amp;gt; accObservable.Delay(timeMouse.Interval)
                                                                                            .ObserveOnWindowsForms()                                                                                            
                                                                                            .Do(__ =&amp;gt; Cursor.Position &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; ((Control)timeMouse.Value.Sender).PointToScreen(&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;new&lt;/span&gt; Point(timeMouse.Value.EventArgs.X, timeMouse.Value.EventArgs.Y))));
                playObservable.Subscribe(value =&amp;gt; { }, () =&amp;gt; recordButton.Enabled &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;true&lt;/span&gt;);
            });&lt;/span&gt;&lt;/pre&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx&amp;amp;subject=Reactive+Monads" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx&amp;amp;subject=Reactive+Monads" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Reactive+Monads/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx&amp;amp;title=Reactive+Monads" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx&amp;amp;title=Reactive+Monads&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx&amp;amp;title=Reactive+Monads" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f27%2freactive-monads.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=57356" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>LiftM'e' up Scotty</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/02/07/liftm-e-up-scotty.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="3087" href="http://www.dotnetzone.gr/cs/blogs/palladin/attachment/56993.ashx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/02/07/liftm-e-up-scotty.aspx</id><published>2010-02-07T21:40:00Z</published><updated>2010-02-07T21:40:00Z</updated><content type="html">&lt;P&gt;Έχοντας αναπτύξει όλο το απαραίτητο machinery (&lt;A href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/12/20/abstracting-over-m-in-f.aspx"&gt;1&lt;/A&gt;, &lt;A href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/01/17/abstracting-over-m-generic-functions.aspx"&gt;2&lt;/A&gt;), μπορούμε να συνεχίσουμε με την ίδια αφαιρετική διάθεση και να "ανεβάσουμε" στον κόσμο του 'M', &lt;BR&gt;συναρτήσεις με ένα, δυο&amp;nbsp;ή περισσότερα arguments.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// liftM declarations&lt;/SPAN&gt;
let liftM&amp;lt;'M, 'A1, 'R when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt; (m : MonadDef&amp;lt;'M&amp;gt;) (f : 'A1 -&amp;gt; 'R) 
                                               (a : IMonad&amp;lt;'A1, 'M&amp;gt;) : IMonad&amp;lt;'R, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                                               m.Map(f, a)

let liftM2&amp;lt;'M, 'A1, 'A2, 'R when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt; (m : MonadDef&amp;lt;'M&amp;gt;) (f : 'A1 -&amp;gt; 'A2 -&amp;gt; 'R) 
                                                     (a : IMonad&amp;lt;'A1, 'M&amp;gt;) (b : IMonad&amp;lt;'A2, 'M&amp;gt;) : IMonad&amp;lt;'R, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                                                     m.Apply(liftM m f a, b)

let liftM3&amp;lt;'M, 'A1, 'A2, 'A3, 'R when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt; (m : MonadDef&amp;lt;'M&amp;gt;) (f : 'A1 -&amp;gt; 'A2 -&amp;gt; 'A3 -&amp;gt; 'R) 
                                                          (a : IMonad&amp;lt;'A1, 'M&amp;gt;) (b : IMonad&amp;lt;'A2, 'M&amp;gt;) 
                                                          (c : IMonad&amp;lt;'A3, 'M&amp;gt;) : IMonad&amp;lt;'R, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                                                          m.Apply(liftM2 m f a b, c)  

&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;//liftM example&lt;/SPAN&gt;
let result &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; liftM2 listM (&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt;) (listM.OfList [0; 1]) (listM.OfList [0; 2])
printfn &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"%A"&lt;/SPAN&gt; result &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;//[0; 2; 1; 3]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Haskell inspiration&lt;BR&gt;&lt;A href="http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html"&gt;http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx&amp;amp;subject=LiftM%27e%27+up+Scotty" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx&amp;amp;subject=LiftM%27e%27+up+Scotty" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/LiftM%27e%27+up+Scotty/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx&amp;amp;title=LiftM%27e%27+up+Scotty" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx&amp;amp;title=LiftM%27e%27+up+Scotty&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx&amp;amp;title=LiftM%27e%27+up+Scotty" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f02%2f07%2fliftm-e-up-scotty.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=56993" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Abstracting over 'M' (generic functions)</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/01/17/abstracting-over-m-generic-functions.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2010/01/17/abstracting-over-m-generic-functions.aspx</id><published>2010-01-17T18:17:00Z</published><updated>2010-01-17T18:17:00Z</updated><content type="html">&lt;P&gt;(Haskell ideas =&amp;gt; F# (OOP + FP))&lt;/P&gt;
&lt;P&gt;Στην Haskell, επειδή έχουμε higher kind polymorphism, μπορούμε να ορίσουμε κάποιες πολύ χρήσιμες και αρκετά γενικές συναρτήσεις για Monads.&lt;BR&gt;Σκέφτηκα να προσπαθήσω να κάνω κάτι αντίστοιχο σε F# (υλοποιώντας ένα Generic List Monad) και να ορίσω τις κλασσικές sequence, mapM, filterM.&lt;/P&gt;
&lt;P&gt;Ως παράδειγμα της δύναμης που μας προσφέρει η αφαίρεση, μπορούμε να ορίσουμε την συνάρτηση του powerset ως εξής:&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;let powerSet xs &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; listM.FilterM ((fun _ -&amp;gt; listM.OfList [&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;false&lt;/SPAN&gt;; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;true&lt;/SPAN&gt;]), listM.OfList xs) &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// it's magic&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN class=Apple-style-span style="WORD-SPACING:0px;FONT:medium 'Times New Roman';TEXT-TRANSFORM:none;TEXT-INDENT:0px;WHITE-SPACE:normal;LETTER-SPACING:normal;BORDER-COLLAPSE:separate;orphans:2;widows:2;-webkit-border-horizontal-spacing:0px;-webkit-border-vertical-spacing:0px;-webkit-text-decorations-in-effect:none;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;SPAN class=Apple-style-span style="FONT-SIZE:13px;FONT-FAMILY:monospace;"&gt;&lt;FONT face=Tahoma color=#000000 size=2&gt;Χρησιμοποιώντας subtype polymorphism και μερικά περιορισμένα downcasts, καταφέραμε να φέρουμε λίγο από το άρωμα και την αίγλη της Haskell στον κόσμο της F#.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN class=Apple-style-span style="WORD-SPACING:0px;FONT:medium 'Times New Roman';TEXT-TRANSFORM:none;TEXT-INDENT:0px;WHITE-SPACE:normal;LETTER-SPACING:normal;BORDER-COLLAPSE:separate;orphans:2;widows:2;-webkit-border-horizontal-spacing:0px;-webkit-border-vertical-spacing:0px;-webkit-text-decorations-in-effect:none;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;"&gt;&lt;SPAN class=Apple-style-span style="FONT-SIZE:13px;FONT-FAMILY:monospace;"&gt;&lt;FONT face=Tahoma color=#000000 size=2&gt;Happy hacking...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;module MonadModule &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;//Generic Monad Definition&lt;/SPAN&gt;
    [&amp;lt;AbstractClass&amp;gt;]
    type MonadDef&amp;lt;'M when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt;() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
         let (&amp;gt;&amp;gt;=) m f &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Bind(m, f)
         let unit v &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Return v
         &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;static&lt;/SPAN&gt; let listDef &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; ListDef()

         &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; member Return&amp;lt;'T&amp;gt; : 'T -&amp;gt; IMonad&amp;lt;'T,'M&amp;gt; 
         &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; member Bind&amp;lt;'T, 'S&amp;gt; : IMonad&amp;lt;'T,'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; ('T -&amp;gt; IMonad&amp;lt;'S,'M&amp;gt;) -&amp;gt; IMonad&amp;lt;'S,'M&amp;gt; 
         &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; member Zero&amp;lt;'T&amp;gt; : unit -&amp;gt; IMonad&amp;lt;'T,'M&amp;gt;
         
         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Delay(f) &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; unit () &amp;gt;&amp;gt;= fun () -&amp;gt; f()
         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Combine&amp;lt;'T&amp;gt;(first : IMonad&amp;lt;unit, 'M&amp;gt;, second : IMonad&amp;lt;'T, 'M&amp;gt;) : IMonad&amp;lt;'T, 'M&amp;gt;  &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Then (first, second)

         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Then&amp;lt;'T, 'S&amp;gt;(firstM : IMonad&amp;lt;'T, 'M&amp;gt;, secondM : IMonad&amp;lt;'S, 'M&amp;gt;) : IMonad&amp;lt;'S, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
            firstM &amp;gt;&amp;gt;= fun _ -&amp;gt; secondM

         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Map&amp;lt;'T, 'S&amp;gt;(f : 'T -&amp;gt; 'S, m : IMonad&amp;lt;'T, 'M&amp;gt;) : IMonad&amp;lt;'S, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
            m &amp;gt;&amp;gt;= fun v -&amp;gt; unit (f v)

         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Apply&amp;lt;'T, 'S&amp;gt;(mf : IMonad&amp;lt;'T -&amp;gt; 'S, 'M&amp;gt;, m : IMonad&amp;lt;'T, 'M&amp;gt;) : IMonad&amp;lt;'S, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
            mf &amp;gt;&amp;gt;= fun f -&amp;gt; m &amp;gt;&amp;gt;= fun v -&amp;gt; unit (f v)   

         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Join&amp;lt;'T&amp;gt;(m : IMonad&amp;lt;IMonad&amp;lt;'T, 'M&amp;gt;, 'M&amp;gt;) : IMonad&amp;lt;'T, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
            m &amp;gt;&amp;gt;= id

         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Sequence&amp;lt;'T&amp;gt;(lm : IMonad&amp;lt;IMonad&amp;lt;'T, 'M&amp;gt;, ListDef&amp;gt;) : IMonad&amp;lt;IMonad&amp;lt;'T, ListDef&amp;gt;, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
            match lm :?&amp;gt; _ with
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nil -&amp;gt; unit (Nil :&amp;gt; _)
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Cons (m, ms) -&amp;gt; m &amp;gt;&amp;gt;= fun v -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Sequence ms &amp;gt;&amp;gt;= fun vs -&amp;gt; unit (listDef.ConsM v vs)
        
         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.MapM&amp;lt;'T, 'S&amp;gt;(f : 'T -&amp;gt; IMonad&amp;lt;'S, 'M&amp;gt;, l : IMonad&amp;lt;'T, ListDef&amp;gt;) : IMonad&amp;lt;IMonad&amp;lt;'S, ListDef&amp;gt;, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;  
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Sequence (listDef.Map ((fun v -&amp;gt; f v), l))

         member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.FilterM&amp;lt;'T&amp;gt;(p : 'T -&amp;gt; IMonad&amp;lt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;bool&lt;/SPAN&gt;, 'M&amp;gt;, l : IMonad&amp;lt;'T, ListDef&amp;gt;) : IMonad&amp;lt;IMonad&amp;lt;'T, ListDef&amp;gt;, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
            match l :?&amp;gt; _ with
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nil -&amp;gt; unit (Nil :&amp;gt; _)
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Cons (x, xs) -&amp;gt; p x &amp;gt;&amp;gt;= fun b -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.FilterM (p, xs) &amp;gt;&amp;gt;= fun ys -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;if&lt;/SPAN&gt; b then unit (listDef.ConsM x ys) &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;else&lt;/SPAN&gt; unit ys   

    and IMonad&amp;lt;'T,'M when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;interface&lt;/SPAN&gt; end 

    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// List Monad&lt;/SPAN&gt;
    and List&amp;lt;'T&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nil
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Cons of ('T &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; List&amp;lt;'T&amp;gt;)
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;interface&lt;/SPAN&gt; IMonad&amp;lt;'T, ListDef&amp;gt;
    and
        ListDef() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
            inherit MonadDef&amp;lt;ListDef&amp;gt;() with
                member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.OfList&amp;lt;'T&amp;gt;(xs : list&amp;lt;'T&amp;gt;) : IMonad&amp;lt;'T, ListDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                    List.foldBack (fun v acc -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.ConsM v acc) xs &amp;lt;| &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Zero() 

                member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.ConsM (x : 'T) (acc : IMonad&amp;lt;'T, ListDef&amp;gt;) : IMonad&amp;lt;'T, ListDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; Cons (x, acc :?&amp;gt; _) :&amp;gt; _
                 
                member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Foldr&amp;lt;'T, 'S&amp;gt;(f : 'T -&amp;gt; 'S -&amp;gt; 'S, seed : 'S, list : IMonad&amp;lt;'T, ListDef&amp;gt;) : 'S &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                    match list :?&amp;gt; _ with
                    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nil -&amp;gt; seed
                    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Cons (x, xs) -&amp;gt; f x (&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Foldr (f, seed, xs) )

                member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Concat&amp;lt;'T&amp;gt;(first : IMonad&amp;lt;'T, ListDef&amp;gt;, second : IMonad&amp;lt;'T, ListDef&amp;gt;) : IMonad&amp;lt;'T, ListDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Foldr(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.ConsM, second, first)

                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Return&amp;lt;'T&amp;gt;(v : 'T) : IMonad&amp;lt;'T, ListDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                    Cons (v, Nil) :&amp;gt; _ 
          
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Bind&amp;lt;'T,'S&amp;gt;(m : IMonad&amp;lt;'T, ListDef&amp;gt;, f : 'T -&amp;gt; IMonad&amp;lt;'S, ListDef&amp;gt;) : IMonad&amp;lt;'S, ListDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;  
                    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Foldr ((fun x acc -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Concat (f x, acc)), Nil :&amp;gt; _, m)

                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Zero&amp;lt;'T&amp;gt;() : IMonad&amp;lt;'T, ListDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                    Nil :&amp;gt; _ 
 
    let listM &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; ListDef()

open MonadModule

&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// Maybe Monad&lt;/SPAN&gt;
module MaybeModule &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;

    type Maybe&amp;lt;'T&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nothing 
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Just of 'T 
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;interface&lt;/SPAN&gt; IMonad&amp;lt;'T, MaybeDef&amp;gt; 
    and 
        
        MaybeDef() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
            inherit MonadDef&amp;lt;MaybeDef&amp;gt;() with
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Return&amp;lt;'T&amp;gt;(v : 'T) : IMonad&amp;lt;'T, MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                    Just v :&amp;gt; _ 
      
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Bind&amp;lt;'T,'S&amp;gt;(m : IMonad&amp;lt;'T, MaybeDef&amp;gt;, f : 'T -&amp;gt; IMonad&amp;lt;'S, MaybeDef&amp;gt;) : IMonad&amp;lt;'S, MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                    match m :?&amp;gt; _ with 
                    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nothing -&amp;gt; Nothing :&amp;gt; _ 
                    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Just x  -&amp;gt; f x

                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Zero&amp;lt;'T&amp;gt;() : IMonad&amp;lt;'T, MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                    Nothing :&amp;gt; _
                
                member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Just&amp;lt;'T&amp;gt;(value : 'T) : IMonad&amp;lt;'T, MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                    Just value :&amp;gt; _
                member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Nothing&amp;lt;'T&amp;gt;() : IMonad&amp;lt;'T, MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
                    Nothing :&amp;gt; _
    
    let maybeM &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; MaybeDef()     
 

open MaybeModule


&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;//Examples&lt;/SPAN&gt;

let test &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; listM.OfList [ maybeM.Just 1; maybeM.Just 2 ]
maybeM.Sequence test |&amp;gt; printfn &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"%A"&lt;/SPAN&gt;


let powerSet xs &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; listM.FilterM ((fun _ -&amp;gt; listM.OfList [&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;false&lt;/SPAN&gt;; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;true&lt;/SPAN&gt;]), listM.OfList xs)
powerSet [1..3] |&amp;gt; printfn &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"%A"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx&amp;amp;subject=Abstracting+over+%27M%27+(generic+functions)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx&amp;amp;subject=Abstracting+over+%27M%27+(generic+functions)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Abstracting+over+%27M%27+(generic+functions)/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx&amp;amp;title=Abstracting+over+%27M%27+(generic+functions)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx&amp;amp;title=Abstracting+over+%27M%27+(generic+functions)&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx&amp;amp;title=Abstracting+over+%27M%27+(generic+functions)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2010%2f01%2f17%2fabstracting-over-m-generic-functions.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=56469" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Only for language geeks</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/12/27/only-for-language-geeks.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/12/27/only-for-language-geeks.aspx</id><published>2009-12-27T12:03:00Z</published><updated>2009-12-27T12:03:00Z</updated><content type="html">&lt;P&gt;No comment&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://imgur.com/P9RnL.jpg"&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx&amp;amp;subject=Only+for+language+geeks" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx&amp;amp;subject=Only+for+language+geeks" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Only+for+language+geeks/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx&amp;amp;title=Only+for+language+geeks" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx&amp;amp;title=Only+for+language+geeks&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx&amp;amp;title=Only+for+language+geeks" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f27%2fonly-for-language-geeks.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=56082" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Abstracting over 'M' (in F#)</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/12/20/abstracting-over-m-in-f.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/12/20/abstracting-over-m-in-f.aspx</id><published>2009-12-20T13:53:00Z</published><updated>2009-12-20T13:53:00Z</updated><content type="html">&lt;P&gt;Μετά από αρκετές αποτυχημένες προσπάθειες, στο να συνδυάσω &lt;A href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/10/25/abstracting-over-m.aspx"&gt;Type constructor polymorphism&lt;/A&gt; και LINQ syntax, αποφάσισα &lt;BR&gt;να δοκιμάσω τις ίδιες ιδέες σε F#.&lt;/P&gt;
&lt;P&gt;Η F# υλοποίηση είναι ακριβώς ίδια με την αντίστοιχη σε C#, με την μονη διαφορα ότι το Monad generalization δουλεύει με το ειδικό &lt;BR&gt;syntax support που μας παρέχουν τα computation expressions.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;[&amp;lt;AbstractClass&amp;gt;]
type MonadDef&amp;lt;'M when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt;() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
     let (&amp;gt;&amp;gt;=) m f &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Bind(m, f)
     let unit v &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Return v

     &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; member Return&amp;lt;'T&amp;gt; : 'T -&amp;gt; IMonad&amp;lt;'T,'M&amp;gt; 
     &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; member Bind&amp;lt;'T, 'S&amp;gt; : IMonad&amp;lt;'T,'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; ('T -&amp;gt; IMonad&amp;lt;'S,'M&amp;gt;) -&amp;gt; IMonad&amp;lt;'S,'M&amp;gt; 
    
     member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Then&amp;lt;'T, 'S&amp;gt;(firstM : IMonad&amp;lt;'T, 'M&amp;gt;, secondM : IMonad&amp;lt;'S, 'M&amp;gt;) : IMonad&amp;lt;'S, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
        firstM &amp;gt;&amp;gt;= fun _ -&amp;gt; secondM

     member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Map&amp;lt;'T, 'S&amp;gt;(f : 'T -&amp;gt; 'S, m : IMonad&amp;lt;'T, 'M&amp;gt;) : IMonad&amp;lt;'S, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
        m &amp;gt;&amp;gt;= fun v -&amp;gt; unit (f v)

     member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Apply&amp;lt;'T, 'S&amp;gt;(mf : IMonad&amp;lt;'T -&amp;gt; 'S, 'M&amp;gt;, m : IMonad&amp;lt;'T, 'M&amp;gt;) : IMonad&amp;lt;'S, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
        mf &amp;gt;&amp;gt;= fun f -&amp;gt; m &amp;gt;&amp;gt;= fun v -&amp;gt; unit (f v)   

     member &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Join&amp;lt;'T&amp;gt;(m : IMonad&amp;lt;IMonad&amp;lt;'T, 'M&amp;gt;, 'M&amp;gt;) : IMonad&amp;lt;'T, 'M&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
        m &amp;gt;&amp;gt;= id

and IMonad&amp;lt;'T,'M when 'M :&amp;gt; MonadDef&amp;lt;'M&amp;gt;&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;interface&lt;/SPAN&gt; end 

type Maybe&amp;lt;'T&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nothing 
    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Just of 'T 
    &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;interface&lt;/SPAN&gt; IMonad&amp;lt;'T, MaybeDef&amp;gt; 
and 
    MaybeDef() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
        inherit MonadDef&amp;lt;MaybeDef&amp;gt;() with
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Return&amp;lt;'T&amp;gt;(v : 'T) : IMonad&amp;lt;'T, MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                Just v :&amp;gt; _ 
  
            &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt;.Bind&amp;lt;'T,'S&amp;gt;(m : IMonad&amp;lt;'T, MaybeDef&amp;gt;, f : 'T -&amp;gt; IMonad&amp;lt;'S, MaybeDef&amp;gt;) : IMonad&amp;lt;'S,MaybeDef&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
                match m :?&amp;gt; _ with 
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Nothing -&amp;gt; Nothing :&amp;gt; _ 
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Just x  -&amp;gt; f x 


let maybe &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; MaybeDef() 

let toMaybeString a &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; 
    maybe { 
        let! v &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; Just a  
        &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; v.ToString()
    }

printfn &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"%A"&lt;/SPAN&gt; (toMaybeString 42)&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx&amp;amp;subject=Abstracting+over+%27M%27+(in+F%23)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx&amp;amp;subject=Abstracting+over+%27M%27+(in+F%23)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Abstracting+over+%27M%27+(in+F%23)/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx&amp;amp;title=Abstracting+over+%27M%27+(in+F%23)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx&amp;amp;title=Abstracting+over+%27M%27+(in+F%23)&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx&amp;amp;title=Abstracting+over+%27M%27+(in+F%23)" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f12%2f20%2fabstracting-over-m-in-f.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=55975" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Διομήδης Σπινέλλης</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/11/06/54972.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/11/06/54972.aspx</id><published>2009-11-06T12:11:00Z</published><updated>2009-11-06T12:11:00Z</updated><content type="html">&lt;P&gt;Πριν πολλά πολλά χρονια... είχα αγοράσει ένα βιβλίο που είχε στο εξώφυλλο ένα ψάρι (the "&lt;A href="http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp/0131774298/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1257509672&amp;amp;sr=8-1"&gt;fish book&lt;/A&gt;")!!!&lt;BR&gt;Αυτό που βρήκα περίεργο στο βιβλίο δεν ήταν το ψάρι αλλα αυτός ο κώδικας &lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:black;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:green;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;/* DDS-BASIC interpreter in "C" annotated by Michael Somos 1997 */&lt;/SPAN&gt;
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:green;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;/* INPUT bug fix 07Sep2005 Somos */&lt;/SPAN&gt;
/* original by Diomidis Spinellis &lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;for&lt;/SPAN&gt; 1990 IOCCC
&amp;lt;URL:http:&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:green;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;//reality.sgi.com/csp/ioccc/1990/dds.c&amp;gt;&lt;/SPAN&gt;

&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; O(b,f,u,s,c,a)b(){&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;int&lt;/SPAN&gt; o=f();&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;switch&lt;/SPAN&gt;(*p++){X u:_ o s b();X c:_ o a b();&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;default&lt;/SPAN&gt;:p--;_ o;}}
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; U(y,z)&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;while&lt;/SPAN&gt;(p=Q(s,y))*p++=z,*p=' '
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; N &lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;for&lt;/SPAN&gt;(i=0;i&amp;lt;11*R;i++)m[ i ]&amp;amp;&amp;amp;
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; I &lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"%d %s\n"&lt;/SPAN&gt;,i,m[ i ]
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; X ;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;break&lt;/SPAN&gt;;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;case&lt;/SPAN&gt;
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; _ &lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;return&lt;/SPAN&gt;
&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;#define&lt;/SPAN&gt; R 999
typedef &lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;char&lt;/SPAN&gt;*A;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;int&lt;/SPAN&gt;*C,E[R],L[R],M[R],P[R],l,i,j;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;char&lt;/SPAN&gt; B[R],F[2];A m[12*R],malloc
(),p,q,x,y,z,s,d,f,fopen();A Q(s,o)A s,o;{&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;for&lt;/SPAN&gt;(x=s;*x;x++){&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;for&lt;/SPAN&gt;(y=x,z=o;*z&amp;amp;&amp;amp;*y==
*z;y++)z++;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;if&lt;/SPAN&gt;(z&amp;gt;o&amp;amp;&amp;amp;!*z)_ x;}_   0;}main(){m[11*R]&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"E"&lt;/SPAN&gt;;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;while&lt;/SPAN&gt;(puts(&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"Ok"&lt;/SPAN&gt;),gets(B)
)&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;switch&lt;/SPAN&gt;(*B){X'R':C=E;l=1;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;for&lt;/SPAN&gt;(i=0;i&amp;lt;R;P[i++]=0);&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;while&lt;/SPAN&gt;(l){&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;while&lt;/SPAN&gt;(!(s=m[l]))l++;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;if&lt;/SPAN&gt;
(!Q(s,&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"\""&lt;/SPAN&gt;)){U(&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"&amp;lt;&amp;gt;"&lt;/SPAN&gt;,'#');U(&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"&amp;lt;="&lt;/SPAN&gt;,'$');U(&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"&amp;gt;="&lt;/SPAN&gt;,'!');}d=B;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;while&lt;/SPAN&gt;(*F=*s){*s=='&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"'&amp;amp;&amp;amp;j
++;if(j&amp;amp;1||!Q("&lt;/SPAN&gt; \t&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(*B){X'E':l=-1
X'R':B[2]!='M'&amp;amp;&amp;amp;(l=*--C)X'I':B[1]=='N'?gets(p=B),P[*d]=S():(*(q=Q(B,"&lt;/SPAN&gt;TH&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"))=0,p
=B+2,S()&amp;amp;&amp;amp;(p=q+4,l=S()-1))X'P':B[5]=='"&lt;/SPAN&gt;'?*d=0,puts(B+6):(p=B+5,printf(&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"%d\n"&lt;/SPAN&gt;,S
()))X'G':p=B+4,B[2]=='S'&amp;amp;&amp;amp;(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"TO"&lt;/SPAN&gt;))=0;p=B+5;P[i
=B[3]]=S();p=q+2;M[ i ]=S();L[ i ]=l X'N':++P[*d]&amp;lt;=M[*d]&amp;amp;&amp;amp;(l=L[*d]);}&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;else&lt;/SPAN&gt; p=B+2,P[
*B]=S();l++;}X'L':N printf(I)X'N':N free(m[ i ]),m[ i ]=0   X'B':_ 0 t('S',5,&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"w"&lt;/SPAN&gt;,N
fprintf(f,I))t('O',4,&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"r"&lt;/SPAN&gt;,&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;while&lt;/SPAN&gt;(fgets(B,R,f))(*Q(B,&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;"\n"&lt;/SPAN&gt;)=0,G()))X 0:&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;default&lt;/SPAN&gt;:G()
;}_ 0;}G(){l=atoi(B);m[l]&amp;amp;&amp;amp;free(m[l]);(p=Q(B,&lt;SPAN style="BACKGROUND-COLOR:#e4e4e4;FONT-FAMILY:Courier New;COLOR:#666666;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;" "&lt;/SPAN&gt;))?strcpy(m[l]=malloc(strlen(p
)),p+1):(m[l]=0,0);}O(S,J,'&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;=&lt;/SPAN&gt;',==,'#',!&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;=&lt;/SPAN&gt;)O(J,K,'&amp;lt;',&amp;lt;,'&amp;gt;',&amp;gt;)O(K,V,'$',&amp;lt;=,'!',&amp;gt;=)
O(V,W,'&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;+&lt;/SPAN&gt;',+,'&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;-&lt;/SPAN&gt;',-)O(W,Y,'&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;*&lt;/SPAN&gt;',*,'&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;/&lt;/SPAN&gt;',/)Y(){&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:blue;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;int&lt;/SPAN&gt; o;_*p=='&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:red;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;-&lt;/SPAN&gt;'?p++,-Y():*p&amp;gt;='0'&amp;amp;&amp;amp;*p&amp;lt;=
'9'?strtol(p,&amp;amp;p,0):*p=='('?p++,o=S(),p++,o:P[*p++];}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="BACKGROUND-COLOR:transparent;FONT-FAMILY:Courier New;COLOR:black;FONT-SIZE:11px;FONT-WEIGHT:normal;"&gt;&lt;FONT size=2 face=Tahoma&gt;Τι θέλει να πει ο ποιητής και ποιος είναι αυτός ο Διομήδης Σπινέλλης,,,μετά από κάποια χρονια έμαθα!!!&lt;BR&gt;Πολλά &lt;A href="http://www.capital.gr/gmessages/showTopic.asp?id=1433722"&gt;συγχαρητήρια&lt;/A&gt; και από εμενα...&lt;BR&gt;Πόσες χώρες έχουν έναν hacker σε τέτοια θέση!!!&lt;/FONT&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx&amp;amp;subject=%ce%94%ce%b9%ce%bf%ce%bc%ce%ae%ce%b4%ce%b7%cf%82+%ce%a3%cf%80%ce%b9%ce%bd%ce%ad%ce%bb%ce%bb%ce%b7%cf%82" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx&amp;amp;subject=%ce%94%ce%b9%ce%bf%ce%bc%ce%ae%ce%b4%ce%b7%cf%82+%ce%a3%cf%80%ce%b9%ce%bd%ce%ad%ce%bb%ce%bb%ce%b7%cf%82" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/%ce%94%ce%b9%ce%bf%ce%bc%ce%ae%ce%b4%ce%b7%cf%82+%ce%a3%cf%80%ce%b9%ce%bd%ce%ad%ce%bb%ce%bb%ce%b7%cf%82/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx&amp;amp;title=%ce%94%ce%b9%ce%bf%ce%bc%ce%ae%ce%b4%ce%b7%cf%82+%ce%a3%cf%80%ce%b9%ce%bd%ce%ad%ce%bb%ce%bb%ce%b7%cf%82" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx&amp;amp;title=%ce%94%ce%b9%ce%bf%ce%bc%ce%ae%ce%b4%ce%b7%cf%82+%ce%a3%cf%80%ce%b9%ce%bd%ce%ad%ce%bb%ce%bb%ce%b7%cf%82&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx&amp;amp;title=%ce%94%ce%b9%ce%bf%ce%bc%ce%ae%ce%b4%ce%b7%cf%82+%ce%a3%cf%80%ce%b9%ce%bd%ce%ad%ce%bb%ce%bb%ce%b7%cf%82" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f11%2f06%2f54972.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=54972" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Abstracting over 'M'</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/10/25/abstracting-over-m.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/10/25/abstracting-over-m.aspx</id><published>2009-10-25T15:34:00Z</published><updated>2009-10-25T15:34:00Z</updated><content type="html">&lt;P&gt;Τον τελευταίο καιρό ψάχνω κάποιο φορμαλισμό (σε C#) ώστε να μπορέσω να έχω έναν generic-reusable ορισμό ενός &lt;A href="http://en.wikipedia.org/wiki/Monad_(functional_programming)"&gt;Monad&lt;/A&gt;.&lt;BR&gt;Αυτό που λείπει από τα .Net generics είναι η δυνατότητα να έχω abstraction σε επίπεδο Type Constructor. &lt;/P&gt;
&lt;P&gt;Σαν παράδειγμα της συγκεκριμένης αφαίρεσης, παρουσιάζω τον generic ορισμό ενός Monad μέσα από δυο αγαπημένες μου γλώσσες.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;Haskell
&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; Monad m where
  (&amp;gt;&amp;gt;=) :: m a -&amp;gt; (a -&amp;gt; m b) -&amp;gt; m b
  &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; :: a -&amp;gt; m a


Scala
&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; Monad[M[_]] {
	def unit[T](a: T): M[T]
	def bind[T, K](m: M[T], f: T =&amp;gt; M[K]): M[K]
}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;FONT face=Tahoma size=2&gt;Μετά από αρκετό πειραματισμό και &lt;A href="http://lambda-the-ultimate.org/node/3629"&gt;μελέτη&lt;/A&gt;, κατέληξα στον παρακάτω κώδικα.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; Monad&amp;lt;T, M&amp;gt; where M : MonadDef&amp;lt;M&amp;gt; { }
	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; MonadDef&amp;lt;M&amp;gt; where M : MonadDef&amp;lt;M&amp;gt;
	{
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; Monad&amp;lt;T, M&amp;gt; Unit&amp;lt;T&amp;gt;(T value);
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; Monad&amp;lt;S, M&amp;gt; Bind&amp;lt;T, S&amp;gt;(Monad&amp;lt;T, M&amp;gt; monad, Func&amp;lt;T, Monad&amp;lt;S, M&amp;gt;&amp;gt; func);

		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; Monad&amp;lt;S, M&amp;gt; Then&amp;lt;T, S&amp;gt;(Monad&amp;lt;T, M&amp;gt; first, Monad&amp;lt;S, M&amp;gt; second)
		{
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; Bind(first, _ =&amp;gt; second);
		}

		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; Monad&amp;lt;S, M&amp;gt; Map&amp;lt;T, S&amp;gt;(Monad&amp;lt;T, M&amp;gt; monad, Func&amp;lt;T, S&amp;gt; f)
		{
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; Bind(monad, value =&amp;gt; Unit(f(value)));
		}

		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; Monad&amp;lt;T, M&amp;gt; Join&amp;lt;T&amp;gt;(Monad&amp;lt;Monad&amp;lt;T, M&amp;gt;, M&amp;gt; monad)
		{
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; Bind(monad, value =&amp;gt; value);
		}
	}
	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// Maybe Monad implementation &lt;/SPAN&gt;
	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; Maybe&amp;lt;T&amp;gt; : Monad&amp;lt;T, MaybeDef&amp;gt;
	{
	}
	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;sealed&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; Just&amp;lt;T&amp;gt; : Maybe&amp;lt;T&amp;gt;
	{
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; T Value { &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;private&lt;/SPAN&gt; set; get; }
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; Just(T value) { Value &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; value; }
	}
	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;sealed&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; Nothing&amp;lt;T&amp;gt; : Maybe&amp;lt;T&amp;gt; { }

	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;static&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; MaybeMonadExtensions
	{
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;static&lt;/SPAN&gt; Maybe&amp;lt;T&amp;gt; ToMaybe&amp;lt;T&amp;gt;(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt; Monad&amp;lt;T, MaybeDef&amp;gt; monad)
		{
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; (Maybe&amp;lt;T&amp;gt;)monad;
		}
	}

	&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;sealed&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;class&lt;/SPAN&gt; MaybeDef : MonadDef&amp;lt;MaybeDef&amp;gt;
	{

		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; Monad&amp;lt;T, MaybeDef&amp;gt; Unit&amp;lt;T&amp;gt;(T value)
		{
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; Just&amp;lt;T&amp;gt;(value);
		}

		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; Monad&amp;lt;S, MaybeDef&amp;gt; Bind&amp;lt;T, S&amp;gt;(Monad&amp;lt;T, MaybeDef&amp;gt; monad, Func&amp;lt;T, Monad&amp;lt;S, MaybeDef&amp;gt;&amp;gt; f)
		{
			Just&amp;lt;T&amp;gt; just &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; monad &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;as&lt;/SPAN&gt; Just&amp;lt;T&amp;gt;;
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;if&lt;/SPAN&gt; (just !&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;null&lt;/SPAN&gt;)
				&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; f(just.Value);
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;else&lt;/SPAN&gt;
				&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; Nothing&amp;lt;S&amp;gt;();
		}
	}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;static&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;void&lt;/SPAN&gt; Main(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;[] args)
	{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var def &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; MaybeDef();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Maybe&amp;lt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;&amp;gt; result &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; def.Bind(def.Unit(42), value =&amp;gt; def.Unit(value.ToString())).ToMaybe();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx&amp;amp;subject=Abstracting+over+%27M%27" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx&amp;amp;subject=Abstracting+over+%27M%27" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Abstracting+over+%27M%27/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx&amp;amp;title=Abstracting+over+%27M%27" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx&amp;amp;title=Abstracting+over+%27M%27&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx&amp;amp;title=Abstracting+over+%27M%27" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f10%2f25%2fabstracting-over-m.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=54710" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>RegEx engine in F#</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/09/27/regex-engine-in-f.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="5129" href="http://www.dotnetzone.gr/cs/blogs/palladin/attachment/54018.ashx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/09/27/regex-engine-in-f.aspx</id><published>2009-09-27T11:54:00Z</published><updated>2009-09-27T11:54:00Z</updated><content type="html">&lt;P&gt;Ένα από τα πολύ δυνατά χαρακτηριστικά μιας functional γλώσσας, είναι η δυνατότητα να δημιουργούμε internal DSLs κάνοντας compose combinators.&lt;/P&gt;
&lt;P&gt;Ένα τέτοιο παράδειγμα, είναι μια regex engine που έγραψα σε F#.&lt;/P&gt;
&lt;P&gt;Κάποιες βασικές&amp;nbsp; ιδέες&amp;nbsp; της υλοποίησης:&lt;BR&gt;&amp;nbsp;- lazy computations for backtracking&lt;BR&gt;&amp;nbsp;- combinators for regex composition&lt;BR&gt;&amp;nbsp;- parametric polymorphism: Generic "named capture variables" and input sequences &lt;BR&gt;&amp;nbsp;- Unions + Active Patterns: pattern matching and value extraction&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Ακολουθεί ένα sample&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;#r &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"FSharp.PowerPack.dll"&lt;/SPAN&gt;
#load &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"RegEx.fs"&lt;/SPAN&gt;

open System
open RegEx

&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// example from http://www.martinfowler.com/bliki/ComposedRegex.html&lt;/SPAN&gt;

type extractTags &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; NumberOfPoint of &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;int&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; NumberOfNights of &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;int&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; HotelName of &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;
let numberOfPoints &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; toInt &amp;gt;&amp;gt; NumberOfPoint
let numberOfNights &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; toInt &amp;gt;&amp;gt; NumberOfNights
let hotelName  &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; toString &amp;gt;&amp;gt; HotelName

let scoreKeyword() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"score"&lt;/SPAN&gt; =&amp;gt; !&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; space()
let numberOfPoints &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; !&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; digit() |&amp;gt; group numberOfPoints
let forKeyword() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; space() =&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"for"&lt;/SPAN&gt; =&amp;gt; space()
let numberOfNights &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; !&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; digit() |&amp;gt; group numberOfNights
let nightsAtKeyword() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; spaces() =&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"nights"&lt;/SPAN&gt; =&amp;gt; spaces() =&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"at"&lt;/SPAN&gt; =&amp;gt; spaces()
let hotelName() &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; !&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; any() |&amp;gt; group hotelName

let pattern &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; scoreKeyword() =&amp;gt; numberOfPoints =&amp;gt; forKeyword() =&amp;gt; numberOfNights =&amp;gt; nightsAtKeyword() =&amp;gt; hotelName() =&amp;gt; endOfLine()

let text &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; List.reduce (fun acc value -&amp;gt; acc &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"\r\n "&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; value)
              [ &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"score 400 for 2 nights at Minas Tirith Airport"&lt;/SPAN&gt;; 
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"score 500 for 6 nights at Athens Airport"&lt;/SPAN&gt;;
                &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"score 200 for 3 nights at London Airport"&lt;/SPAN&gt; ] &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"\r\n"&lt;/SPAN&gt;

let result &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; patternMatch pattern text

&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// pattern match&lt;/SPAN&gt;
match result with
&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Success ( (NumberOfPoint(points) :: NumberOfNights(nights) :: HotelName(name) :: _) :: _ ) -&amp;gt; printfn &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"Points: %d, Nights %d, Hotel name: %s"&lt;/SPAN&gt; points nights name
&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; Failure -&amp;gt; ()

                
let replacePattern &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; function
&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; [NumberOfPoint(points); NumberOfNights(nights); HotelName(name)] -&amp;gt; sprintf &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"score %d for %d nights at %s"&lt;/SPAN&gt; (points &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; 2) (nights &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;*&lt;/SPAN&gt; 3) (name &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;" ok"&lt;/SPAN&gt;)
&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; _ -&amp;gt; failwith &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"Expected extraction pattern: score {NumberOfPoint} for {NumberOfNights} nights at {HotelName}"&lt;/SPAN&gt;

let replacedResult &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; patternReplace pattern text replacePattern |&amp;gt; Array.of_seq |&amp;gt; (fun (chars : array&amp;lt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;char&lt;/SPAN&gt;&amp;gt;) -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; String(chars))&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx&amp;amp;subject=RegEx+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx&amp;amp;subject=RegEx+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/RegEx+engine+in+F%23/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx&amp;amp;title=RegEx+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx&amp;amp;title=RegEx+engine+in+F%23&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx&amp;amp;title=RegEx+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f27%2fregex-engine-in-f.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=54018" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>letrec</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/09/13/letrec.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/09/13/letrec.aspx</id><published>2009-09-13T19:44:00Z</published><updated>2009-09-13T19:44:00Z</updated><content type="html">&lt;P&gt;Ο Bart de smet συνεχίζει την πολύ καλή σειρά από posts, και αυτή την φορα μας παρουσιάζει ένα &lt;A href="http://community.bartdesmet.net/blogs/bart/archive/2009/09/12/taming-your-sequence-s-side-effects-through-ienumerable-let.aspx"&gt;cache Enumerable&lt;/A&gt;, μαζί με έναν "let" binder.&lt;BR&gt;Φυσικά λείπει το αδελφάκι "letrec", όπου έμεινε ως άσκηση για τον αναγνώστη.&lt;BR&gt;(η αφορμή που έψαχνα για να ξυπνήσει Ο old schemer μέσα μου)&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;delegate&lt;/SPAN&gt; Func&amp;lt;A, R&amp;gt; Recursive&amp;lt;A, R&amp;gt;(Recursive&amp;lt;A, R&amp;gt; r);
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;static&lt;/SPAN&gt; Func&amp;lt;A, R&amp;gt; Y&amp;lt;A, R&amp;gt;(Func&amp;lt;Func&amp;lt;A, R&amp;gt;, Func&amp;lt;A, R&amp;gt;&amp;gt; f)
		{
			Recursive&amp;lt;A, R&amp;gt; rec &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; r =&amp;gt; a =&amp;gt; f(r(r))(a);
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; rec(rec);
		}
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;static&lt;/SPAN&gt; IEnumerable&amp;lt;U&amp;gt; Let&amp;lt;T, U&amp;gt;(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt; IEnumerable&amp;lt;T&amp;gt; source, Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;, IEnumerable&amp;lt;U&amp;gt;&amp;gt; function)
		{
			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;using&lt;/SPAN&gt; (var mem &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;new&lt;/SPAN&gt; MemoizeEnumerable&amp;lt;T&amp;gt;(source))
			{
				&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;foreach&lt;/SPAN&gt; (var item &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;in&lt;/SPAN&gt; function(mem))
					yield &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; item;
			}
		}
		&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;static&lt;/SPAN&gt; IEnumerable&amp;lt;U&amp;gt; LetRec&amp;lt;T, U&amp;gt;(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;this&lt;/SPAN&gt; IEnumerable&amp;lt;T&amp;gt; source, Func&amp;lt;Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;, IEnumerable&amp;lt;U&amp;gt;&amp;gt;, Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;, IEnumerable&amp;lt;U&amp;gt;&amp;gt;&amp;gt; function)
		{
			Func&amp;lt;Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;, IEnumerable&amp;lt;U&amp;gt;&amp;gt;, Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;, IEnumerable&amp;lt;U&amp;gt;&amp;gt;&amp;gt; letWrap &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
				f =&amp;gt; x =&amp;gt; Let(x, function(f));

			&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;return&lt;/SPAN&gt; Y(letWrap)(source);
		}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx&amp;amp;subject=letrec" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx&amp;amp;subject=letrec" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/letrec/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx&amp;amp;title=letrec" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx&amp;amp;title=letrec&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx&amp;amp;title=letrec" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f09%2f13%2fletrec.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=53698" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>A dynamic Y Combinator</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/08/17/a-dynanic-y-combinator.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/08/17/a-dynanic-y-combinator.aspx</id><published>2009-08-17T14:02:00Z</published><updated>2009-08-17T14:02:00Z</updated><content type="html">&lt;P&gt;Ο Bart de Smet έγραψε ένα πολύ καλο blog &lt;A href="http://community.bartdesmet.net/blogs/bart/archive/2009/08/17/mis-using-c-4-0-dynamic-type-free-lambda-calculus-church-numerals-and-more.aspx"&gt;post&lt;/A&gt; για όσους θέλουν να πάρουν μια&lt;BR&gt;μικρή γεύση από την ομορφιά και την δύναμη του λ-λογισμου. &lt;/P&gt;
&lt;P&gt;To ενδιαφέρον στην προσπάθεια είναι ότι o Bart μας παρουσιάζει την untyped εκδοχή του λογισμού χρησιμοποιώντας το dynamic feautre της C# 4.0!!!&lt;/P&gt;
&lt;P&gt;Διαβάζοντας το post είδα ότι λείπει ο Y combinator... οποτε ορίστε μια εκδοχή που σκέφτηκα... &lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;            Func&amp;lt;Func&amp;lt;dynamic, dynamic&amp;gt;, dynamic&amp;gt; fd &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; x =&amp;gt; x;&lt;/SPAN&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;
            dynamic Y &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; fd(f =&amp;gt; fd(x =&amp;gt; f(fd(y =&amp;gt; x(x)(y))))(fd(x =&amp;gt; f(fd(y =&amp;gt; x(x)(y))))));
            Y(fd(f =&amp;gt; fd(x =&amp;gt; f(x))))(42);&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR&gt;Remarks:&lt;/P&gt;
&lt;P&gt;Επειδή ο compiler δεν με αφήνει να παω από lambda σε dynamic&lt;BR&gt;dynamic f = x =&amp;gt; x; // type error&lt;BR&gt;Αντί να κάνω συνεχεια new Func&amp;lt;dynamic, dynamic&amp;gt;(x =&amp;gt; x)(οπως γίνεται στο post), σκέφτηκα να χρησιμοποιήσω μια μικρή συνάρτηση&lt;BR&gt;ώστε να προσπεράσω τον περιορισμό.&lt;BR&gt;dynamic f = fd(x =&amp;gt; x);&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;(Παρεμπιπτόντως, αυτή είναι η πρώτη φορα που χρησιμοποιώ το νέο dynamic feature :))&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx&amp;amp;subject=A+dynamic+Y+Combinator" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx&amp;amp;subject=A+dynamic+Y+Combinator" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/A+dynamic+Y+Combinator/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx&amp;amp;title=A+dynamic+Y+Combinator" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx&amp;amp;title=A+dynamic+Y+Combinator&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx&amp;amp;title=A+dynamic+Y+Combinator" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f08%2f17%2fa-dynanic-y-combinator.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=53095" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Concepts will remain concepts... for now</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/07/31/concepts-will-remain-concepts-for-now.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/07/31/concepts-will-remain-concepts-for-now.aspx</id><published>2009-07-31T15:54:00Z</published><updated>2009-07-31T15:54:00Z</updated><content type="html">&lt;P&gt;Τα Concepts δυστυχώς δεν θα είναι στο νέο Standard της C++.&lt;BR&gt;Για μένα αυτό ήταν το πιο σημαντικό feature... θα έδινε τέλος στα απίστευτα template error messages... και θα έκανε πραγματικότητα το&lt;BR&gt;όραμα του Stepanov για pure generic programming.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://lambda-the-ultimate.org/node/3518#comment-50071"&gt;http://lambda-the-ultimate.org/node/3518#comment-50071&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Η C++ πριν από 10 χρονια ήταν η αγαπημένη μου γλώσσα... (Είναι η γλώσσα με τα περισσότερα βιβλία στην βιβλιοθήκη μου)&lt;BR&gt;Είχα πει ότι θα ξανά-γράψω C++ όταν θα έχω Concepts, δυστυχώς πλέον είναι πολύ μακριά.&lt;/P&gt;
&lt;P&gt;Νομίζω ότι κόσμος χρειάζεται μια νέα multi-paradigm system-oriented γλώσσα.&lt;/P&gt;
&lt;P&gt;It was The Golden Age of Grotesque&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx&amp;amp;subject=Concepts+will+remain+concepts...+for+now" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx&amp;amp;subject=Concepts+will+remain+concepts...+for+now" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Concepts+will+remain+concepts...+for+now/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx&amp;amp;title=Concepts+will+remain+concepts...+for+now" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx&amp;amp;title=Concepts+will+remain+concepts...+for+now&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx&amp;amp;title=Concepts+will+remain+concepts...+for+now" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f07%2f31%2fconcepts-will-remain-concepts-for-now.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=52883" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>Functional style regex engine in F#</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/05/30/functional-style-regex-engine-in-f.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/05/30/functional-style-regex-engine-in-f.aspx</id><published>2009-05-30T12:03:00Z</published><updated>2009-05-30T12:03:00Z</updated><content type="html">&lt;P&gt;Κατά καιρούς συναντώ πολύ όμορφα κομμάτια κώδικα στο web. Ένα από αυτά είναι και&lt;/P&gt;
&lt;P&gt;η&lt;A href="http://www.cookcomputing.com/blog/archives/000595.html"&gt; toy regex engine&lt;/A&gt; που &lt;SPAN class=Apple-style-span style="WORD-SPACING:0px;FONT:13px Arial;TEXT-TRANSFORM:none;TEXT-INDENT:0px;WHITE-SPACE:pre;LETTER-SPACING:normal;BORDER-COLLAPSE:collapse;orphans:2;widows:2;-webkit-border-horizontal-spacing:2px;-webkit-border-vertical-spacing:2px;-webkit-text-decorations-in-effect:none;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0;"&gt;εντόπισα&lt;/SPAN&gt; στο blog του Charles Cook.&lt;/P&gt;
&lt;P&gt;Για το code archive μου... παραθέτω την υλοποίηση σε F# που εμπνεύστηκα&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;let &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;char&lt;/SPAN&gt; c (s : &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;) &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; seq { &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;if&lt;/SPAN&gt; s.Length &amp;gt; 0 &amp;amp;&amp;amp; s.[0] &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; c then yield s.Substring(1) }

let (=&amp;gt;) l r s &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; seq { &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;for&lt;/SPAN&gt; sl &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;in&lt;/SPAN&gt; l s &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;for&lt;/SPAN&gt; sr &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;in&lt;/SPAN&gt; r sl -&amp;gt; sr }

let (&amp;lt;|&amp;gt;) l r s &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; seq { yield! l s; yield! r s }

let rec (&amp;lt;*&amp;gt;) e s &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; seq { yield s; yield! (e =&amp;gt; (&amp;lt;*&amp;gt;) e) s }

let (&amp;lt;+&amp;gt;) e &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; e =&amp;gt; (&amp;lt;*&amp;gt;) e

&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// example c(a|d)+r&lt;/SPAN&gt;
let pattern &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;char&lt;/SPAN&gt; 'c' =&amp;gt; (&amp;lt;+&amp;gt;) (&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;char&lt;/SPAN&gt; 'a' &amp;lt;|&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;char&lt;/SPAN&gt; 'd') =&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;char&lt;/SPAN&gt; 'r'&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx&amp;amp;subject=Functional+style+regex+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx&amp;amp;subject=Functional+style+regex+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/Functional+style+regex+engine+in+F%23/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx&amp;amp;title=Functional+style+regex+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx&amp;amp;title=Functional+style+regex+engine+in+F%23&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx&amp;amp;title=Functional+style+regex+engine+in+F%23" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f05%2f30%2ffunctional-style-regex-engine-in-f.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=51155" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>An F# Solution to Eric Lippert's Challenge</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/04/16/an-f-solution-to-eric-lippert-s-challenge.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/04/16/an-f-solution-to-eric-lippert-s-challenge.aspx</id><published>2009-04-16T09:46:00Z</published><updated>2009-04-16T09:46:00Z</updated><content type="html">&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;FONT face=Verdana size=2&gt;Ο Erik Lippert στο τελευταίο του &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/ericlippert/archive/2009/04/15/comma-quibbling.aspx"&gt;&lt;FONT face=Verdana size=2&gt;blog post&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, έθεσε ένα απλό προβληματάκι.&lt;BR&gt;Ακολουθεί η λύση που έκανα post.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;#r &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"FSharp.PowerPack.dll"&lt;/SPAN&gt;

let format (words : seq&amp;lt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;&amp;gt;) &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
  let rec format (words : LazyList&amp;lt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;&amp;gt;) acc &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt;
      match words with
          &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; LazyList.Nil -&amp;gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;.Empty
          &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; LazyList.Cons(first, LazyList.Nil) -&amp;gt; first
          &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; LazyList.Cons(first, LazyList.Cons(second, LazyList.Nil)) -&amp;gt; acc &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; first &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;" and "&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; second
          &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;|&lt;/SPAN&gt; LazyList.Cons(first, rest) -&amp;gt;  acc &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; first &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;", "&lt;/SPAN&gt; |&amp;gt; format rest 
          
  let listOfWords &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; LazyList.of_seq words  
  &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"{"&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; (format  listOfWords &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt;.Empty) &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;+&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"}"&lt;/SPAN&gt;


[&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"ABC"&lt;/SPAN&gt;; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"DEF"&lt;/SPAN&gt;; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"G"&lt;/SPAN&gt;; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"H"&lt;/SPAN&gt; ] |&amp;gt; format
[&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"ABC"&lt;/SPAN&gt;; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"DEF"&lt;/SPAN&gt; ] |&amp;gt; format 
[&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"ABC"&lt;/SPAN&gt;] |&amp;gt; format
[] |&amp;gt; format&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx&amp;amp;subject=An+F%23+Solution+to+Eric+Lippert%27s+Challenge" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx&amp;amp;subject=An+F%23+Solution+to+Eric+Lippert%27s+Challenge" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/An+F%23+Solution+to+Eric+Lippert%27s+Challenge/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx&amp;amp;title=An+F%23+Solution+to+Eric+Lippert%27s+Challenge" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx&amp;amp;title=An+F%23+Solution+to+Eric+Lippert%27s+Challenge&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx&amp;amp;title=An+F%23+Solution+to+Eric+Lippert%27s+Challenge" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f16%2fan-f-solution-to-eric-lippert-s-challenge.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=50122" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>April fool's day</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/04/01/april-fool-s-day.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/04/01/april-fool-s-day.aspx</id><published>2009-04-01T11:02:00Z</published><updated>2009-04-01T11:02:00Z</updated><content type="html">&lt;P&gt;&lt;EM&gt;On &lt;/EM&gt;1&lt;I&gt; April &lt;/I&gt;1925&lt;I&gt;, I was sick in bed ... In the morning my brother Emile &lt;/I&gt;(&lt;I&gt;ten years my senior&lt;/I&gt;)&lt;I&gt; came into my bedroom and said: "Well, Raymond, today is April Fool's Day, and I will fool you as you have never been fooled before!" I waited all day for him to fool me, but he didn't.&lt;/I&gt; &lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www-groups.dcs.st-and.ac.uk/~history/BigPictures/Smullyan.jpeg"&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx&amp;amp;subject=April+fool%27s+day" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx&amp;amp;subject=April+fool%27s+day" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/April+fool%27s+day/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx&amp;amp;title=April+fool%27s+day" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx&amp;amp;title=April+fool%27s+day&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx&amp;amp;title=April+fool%27s+day" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f04%2f01%2fapril-fool-s-day.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=49771" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry><entry><title>And the Oscar goes to -&gt; Real World Haskell</title><link rel="alternate" type="text/html" href="http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/03/15/and-the-oscar-goes-to-gt-real-world-haskell.aspx" /><id>http://www.dotnetzone.gr/cs/blogs/palladin/archive/2009/03/15/and-the-oscar-goes-to-gt-real-world-haskell.aspx</id><published>2009-03-15T10:33:00Z</published><updated>2009-03-15T10:33:00Z</updated><content type="html">&lt;P&gt;“Avoid Success at All Costs!” ... ήταν το ανεπίσημο slogan της Haskell.&lt;BR&gt;Οι εποχές &lt;A href="http://www.realworldhaskell.org/blog/2009/03/12/we-won-a-jolt-award/"&gt;άλλαξαν&lt;/A&gt;... και το platonic realm ~"αντικατοπτρίζει"~ τον &lt;A href="http://book.realworldhaskell.org/"&gt;πραγματικό κόσμο&lt;/A&gt;.&lt;BR&gt;Ένα από τα καλύτερα tech-science-books που διάβασα το 2008.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://book.realworldhaskell.org/support/rwh-200.jpg"&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Μοιραστείτε τη δημοσίευση:&lt;/strong&gt; &lt;a href = "mailto:?body=Πιστεύω ότι μπορεί να το βρεις ενδιαφέρον: http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx&amp;amp;subject=And+the+Oscar+goes+to+-%26gt%3b+Real+World+Haskell" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;email-it!&lt;/a&gt; |  &lt;a href = "http://www.facebook.com/share.php?u=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx&amp;amp;subject=And+the+Oscar+goes+to+-%26gt%3b+Real+World+Haskell" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;Share on Facebook&lt;/a&gt; |  &lt;a href = "http://www.foracamp.gr/user/login?destination=?/node/add/story/And+the+Oscar+goes+to+-%26gt%3b+Real+World+Haskell/http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;ForaCamp.gr!&lt;/a&gt; |  &lt;a href = "http://www.digme.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;DigMe!&lt;/a&gt; |  &lt;a href = "http://www.bobit.gr/articles/new?bob_this=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;BobIt!&lt;/a&gt; |  &lt;a href = "http://buzz.reality-tape.com/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;Buzz!&lt;/a&gt; |  &lt;a href = "http://checkit.gr/submit.php?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;CheckIt!&lt;/a&gt; |  &lt;a href = "http://www.cull.gr/refer?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx&amp;amp;title=And+the+Oscar+goes+to+-%26gt%3b+Real+World+Haskell" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;Cull!&lt;/a&gt; |  &lt;a href = "http://blogspace.gr/bookmarks/bookmarks.php/?action=add&amp;amp;address=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx&amp;amp;title=And+the+Oscar+goes+to+-%26gt%3b+Real+World+Haskell&amp;amp;description=" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;BlogSpace&lt;/a&gt; |  &lt;a href = "http://www.baza.gr/link?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;Baza.gr&lt;/a&gt; |  &lt;a href = "http://www.kickit.gr/submit?url=http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx&amp;amp;title=And+the+Oscar+goes+to+-%26gt%3b+Real+World+Haskell" target="_blank" title = "Post http%3a%2f%2fwww.dotnetzone.gr%2fcs%2fblogs%2fpalladin%2farchive%2f2009%2f03%2f15%2fand-the-oscar-goes-to-gt-real-world-haskell.aspx"&gt;KickIt.gr&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.dotnetzone.gr/cs/aggbug.aspx?PostID=49196" width="1" height="1"&gt;</content><author><name>PALLADIN</name><uri>http://www.dotnetzone.gr/cs/members/PALLADIN.aspx</uri></author></entry></feed>