Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Xuan Bi bixuanzju

🎯
Focusing
Block or report user

Report or block bixuanzju

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View church-encoding.hs
{-# LANGUAGE RankNTypes #-}
newtype BST k v = Roll
{ unroll :: forall r. r -> (k -> v -> r -> r -> r) -> r
}
-- Two constructors
leave :: BST k v
leave = Roll const
@bixuanzju
bixuanzju / sml.el
Last active Dec 25, 2015
For Coursera
View sml.el
(defun isml ()
"If sml repl exists, then restart it else create a new repl."
(interactive)
(when (get-buffer "*sml*")
(with-current-buffer "*sml*"
(when (process-live-p "sml")
(comint-send-eof)))
(sleep-for 0.2))
(sml-run "sml" ""))
You can’t perform that action at this time.