Skip to content

Instantly share code, notes, and snippets.


Manish Tomar manishtomar

View GitHub Profile

Keybase proof

I hereby claim:

  • I am manishtomar on github.
  • I am manishtomar ( on keybase.
  • I have a public key ASCpQHS__GMYEg-lDWrAH2vp9wgIpFkBmetHhip4NcGJeAo

To claim this, I am signing this object:

manishtomar /
Last active Aug 29, 2015
Python tricks learned
  • Passing default arg in next(). This is useful when you've to choose a value based on a condition. An example
manishtomar / predicates.hs
Last active Aug 29, 2015
Combining predicates
View predicates.hs
all_preds :: [a -> Bool] -> a -> Bool
all_preds ps = \x -> and $ map (\p -> p x) ps
any_preds :: [a -> Bool] -> a -> Bool
any_preds ps = \x -> or $ map (\p -> p x) ps