Functional Ruby
summary
Ruby supports closures (blocks, Procs, lambdas) and shows concrete differences: proc vs lambda arity and return behavior — lambdas enforce argument count and return only from themselves, procs fill missing args with nil and can return from the enclosing method. CRuby has a GIL and ~95% market share while JRuby runs on the JVM and calls Java. Immutability is shallow with freeze; hamster immutable collections return new vectors. Enumerable offers lazy, currying, pattern matching and handy methods like tally and method-to-object conversion via method and &.
AI-written summary · about
chapters (21)
- 0:00Functional Ruby intro
- 1:08Ruby’s origins
- 2:11Ruby on JVM benefits
- 2:54Lisp features in Ruby
- 3:39Ruby code blocks
- 4:45How times works
- 5:49First-class functions
- 6:53Procs vs lambdas
- 8:16Lambdas and procs defined
- 9:20Arity differences
- 10:02Return behavior
- 11:06Call shorthand
- 11:49Duck typing callables
- 13:13Ruby immutability limits
- 13:53Freezing objects limits
- 14:57Hamster gem intro
- 15:38Hamster Vector chaining
- 16:01Methods to first-class
- 16:43Ruby Enumerable library
- 17:46Immutable Enumerable
- 18:07Lazy evaluation








