Skip to content

Instantly share code, notes, and snippets.

View PiDelport's full-sized avatar
💜
𝝺 🦀️ 🐍️ ☕️ 🏳️‍🌈️ 🏳️‍⚧️

Pi Delport PiDelport

💜
𝝺 🦀️ 🐍️ ☕️ 🏳️‍🌈️ 🏳️‍⚧️
View GitHub Profile
@jml
jml / protolude-wishlist.md
Last active August 25, 2018 12:48
Things I want in Protolude

Stephen Diehl's protolude library is excellent. I highly recommend it as a default prelude for Haskell.

It's so good and so close to what I want that whenever I do come across something missing it's as obvious as a glitch in good music.

Here's what I'd like:

<<$>>

(&lt;&lt;$&gt;&gt;) :: (Functor f, Functor g) =&gt; (a -&gt; b) -&gt; f (g a) -&gt; f (g b)
parts s = do
a <- [1..s-1]
b <- [1..s-a]
c <- [1..s-a-b]
d <- [1..s-a-b-c]
return [a, b, c, d]
@eliben
eliben / templatelexer.py
Created August 8, 2012 09:33
initial attempt implementing the go template lexer in Python
from collections import namedtuple
TOK_TEXT = 'TOK_TEXT'
TOK_LEFT_META = 'TOK_LEFT_META'
TOK_RIGHT_META = 'TOK_RIGHT_META'
TOK_DUMMY = 'TOK_DUMMY'
# A token has