<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><a href="http://hackage.haskell.org/package/slot-lambda" target="_blank">http://hackage.haskell.org/package/slot-lambda</a><br><br>It lets your write lambdas with 'slots' without inventing names for the parameters.<br><pre>[s| ı + ı |]  =  \x y -> x+y<br><br>The unicode character <tt>ı</tt>(305) representing a 'slot' can be input in vim with the digraph 'i.' . <br>Use _ı to refer to the immediate left ı, and _0, _1, _2, ... to refer to the 1st, 2nd, 3rd, ... arguments respectively. <br>e.g.<br>[s| ı : ı : _ı : ı : _ı : _ı : _0 : [] |] 'a' 'b' 'c'
=  (\x y z -> x:y:y:z:z:z:x:[]) 'a' 'b' 'c'
=  "abbccca"<br>I originally intended using '_' to represent the 'slots' but that doesn't parse as legal haskell. <br>Actually I wonder how to achieve that without rolling my own haskell parser or forking haskell-src-exts.<br></pre></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>