Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am r05al on github.
  • I am peterrosal (https://keybase.io/peterrosal) on keybase.
  • I have a public key ASCGlJkkqvX919LbKOVRai47y5Z-0kJn5sE-FMpAmk8WKQo

To claim this, I am signing this object:

@r05al
r05al / keybase.md
Last active February 13, 2017 20:50

Keybase proof

I hereby claim:

  • I am r05al on github.
  • I am prosal (https://keybase.io/prosal) on keybase.
  • I have a public key ASCbG_TaHP_mjnihjOy08gCZ6NOjVrhHOTR5P6WLKS0Oywo

To claim this, I am signing this object:

@r05al
r05al / gist:23d8807375734821f7485ff4ecf66b80
Last active November 24, 2016 01:57
immutable concepts
Immutable data and Immutable.js
Inspired by Clojure, Scala, Haskell
Persistent data means API yields new updated data.
Data structures include: List, Stack, Map, OrderedMap, Set, OrderedSet, Record
Efficiency through use of structural sharing via hash map tries and vector tries.
npm install immutable
Philisophy of Ruby
to emphasize feeling
orthogonality, simplifing through combining and reducing exceptions
- does not promote readability, understanding
many ways to do one thing
concise and succinct, like pseudo code that runs
express intent to computers to work for humans
minimize suprise, fewer nuances
##Method Calls
method_name(param1, param2, ...)
return_value = method_name param1, param2
mod_return_value = method_name(param1, param2).modify_original_return_val
parentheses are optional, unless also passing block
Any method can be called with a block as an implicit argument, using yield with a value