Skip to content

Instantly share code, notes, and snippets.

@surjikal
Created October 21, 2013 23:01
Show Gist options
  • Save surjikal/7092319 to your computer and use it in GitHub Desktop.
Save surjikal/7092319 to your computer and use it in GitHub Desktop.
isType = do ->
getType = (x) -> x.constructor.name
[[],{}].reduce ((result, x) ->
type = getType(x)
result[type] = (y) -> getType(y) is type
),{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment