- About the (simple) exercise
- Higher Order Functions
- Throwing exceptions: here be dragons!!
- Sentinel values: better but not great
- The
Option
: error as an ADT - Functional combinators: add some sugar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# vim: set filetype=ruby: | |
# b - browse Chrome bookmarks with fzf | |
[ $(uname) = Darwin ] || exit 1 | |
which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1 | |
/usr/bin/ruby -x "$0" | | |
fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin | | |
awk 'BEGIN { FS = "\t" } { print $2 }' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.Matchers.allOf; | |
import static org.hamcrest.Matchers.any; | |
import static org.hamcrest.Matchers.anyOf; | |
import static org.hamcrest.Matchers.anything; | |
import static org.hamcrest.Matchers.describedAs; | |
import static org.hamcrest.Matchers.endsWith; | |
import static org.hamcrest.Matchers.equalTo; | |
import static org.hamcrest.Matchers.equalToIgnoringWhiteSpace; | |
import static org.hamcrest.Matchers.instanceOf; |