Skip to content

Instantly share code, notes, and snippets.

Avatar
🙈
heads down

Haisheng Wu haishengwu-okta

🙈
heads down
  • Okta, Inc
  • San Francisco
View GitHub Profile
View throttle-sample.js
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 Aug 24, 2017
Hello Hibernate
View 1.md
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 Oct 8, 2015 — forked from xiaolzha/reader_state_monads.hs
Combine reader monad and state monad
View reader_state_monads.hs
{-# 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