Skip to content

Instantly share code, notes, and snippets.

View haishengwu-okta's full-sized avatar
🙈
heads down

Haisheng Wu haishengwu-okta

🙈
heads down
  • Okta, Inc
  • San Francisco
View GitHub Profile
const f1 = (x) => { console.log(x); };
const f2 = _.throttle(f1, 100, { trailing: false });
f2('a');
f2('b');
f2('c');
f2('d');
@haishengwu-okta
haishengwu-okta / 1.md
Last active August 24, 2017 05:30
Hello Hibernate
data Teacher = T { students :: [Student]
                 , departs :: [Department]
                }
-- Student and Department do not matter so far
@haishengwu-okta
haishengwu-okta / reader_state_monads.hs
Last active October 8, 2015 18:17 — forked from xiaolzha/reader_state_monads.hs
Combine reader monad and state monad
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad.Reader
import Control.Monad.State
import Data.Text
import qualified Data.Map.Strict as M
import Prelude hiding (unwords)
--type ContextName = Text