Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)
I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.
A functor is something that supports map
.
<?php | |
final class Basket implements RecordsEvents | |
{ | |
private $basketCanOnlyContainFiveProducts; | |
private function __construct() | |
{ | |
$this->basketCanOnlyContainFiveProducts = new BasketCanOnlyContainFiveProducts(); | |
} |
<?php | |
// iterator impl: | |
class MapIterator implements Iterator { | |
private $f; | |
private $inner; | |
public function __construct($f, $inner) { | |
$this->f = $f; |
#!/bin/bash | |
phpunit | |
EXIT_CODE="$?" | |
if [ $EXIT_CODE -eq "255" ]; then | |
# Wrapping the error code to 1, so bisect marks this build as "bad" and continues. | |
exit 1 | |
fi |
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
});
#! /bin/sh | |
alias gs="git status" | |
alias gc="git commit" | |
alias gr="git checkout" | |
alias ga="git add" | |
alias gl="git lola" |
#! /bin/sh | |
alias gs="git status" | |
alias gc="git commit" | |
alias gr="git checkout" | |
alias ga="git add" | |
alias gl="git lola" |