Skip to content

Instantly share code, notes, and snippets.

@xiaolzha
xiaolzha / MongoDB.hs
Created April 24, 2012 06:57 — forked from mightybyte/MongoDB.hs
Snap.Snaplet.Auth.Backends.MongoDB
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Snap.Snaplet.Auth.Backends.MongoDB
( initMongoAuth
) where
------------------------------------------------------------------------------
import Control.Arrow
@xiaolzha
xiaolzha / recursion_demo.py
Created May 1, 2012 07:42 — forked from tiye/recursion_demo.py
recursion of ESC
#change to Python 3.x and fixed a bug
import types
cursor = '\t'
def recur(arr, cursorList, result):
if arr == []:
return (result , cursorList)
head = arr[0]