Skip to content

Instantly share code, notes, and snippets.

@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@obstschale
obstschale / octave.md
Last active March 29, 2024 22:51
An Octave introduction cheat sheet.
@felipecrv
felipecrv / Option.php
Created November 5, 2013 01:12
The Maybe Monad [1] in PHP inspired by Scala's implementation of this concept which they call Option [2]. [1] http://en.wikipedia.org/wiki/Monad_%28functional_programming%29#The_Maybe_monad [2] http://www.scala-lang.org/api/current/scala/Option.html
<?php
interface Option/*[T]*/ {
/**
* @return T
*/
public function get();
/**
* @param => T $f
@kencoba
kencoba / Decorator.scala
Created February 21, 2012 11:27
Decorator pattern (Design Patterns in Scala)
// http://en.wikipedia.org/wiki/Decorator_pattern
trait Coffee {
def cost:Double
def ingredients: String
}
class SimpleCoffee extends Coffee {
override def cost = 1
override def ingredients = "Coffee"