Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Created April 28, 2010 21:36
Show Gist options
  • Save StanAngeloff/382757 to your computer and use it in GitHub Desktop.
Save StanAngeloff/382757 to your computer and use it in GitHub Desktop.
obj: {
_value: []
get value: -> @_value
set value: (val) -> @_value: val
one: (n) -> n.concat [n[-1] + 1]
two: (n) -> n.concat [n[-1] + 2]
}
using one, two of obj
obj.value: [0] | one() | two()
puts inspect obj.value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment