This file contains hidden or 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
| defmodule MyList do | |
| def mymax([h | t]), do: mymax(h, t) | |
| def mymax(v, []), do: v | |
| def mymax(v, [h | t]) when h < v, do: mymax(v, t) | |
| def mymax(_v, [h | t]), do: mymax(h, t) |
This file contains hidden or 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
| #!/bin/bash | |
| alias reload="source ~/.bashrc" | |
| # source the sublimerc file if it exists | |
| if [ -f "${HOME}/.sublimerc" ] ; then | |
| source "${HOME}/.sublimerc" | |
| fi | |
| src() |
This file contains hidden or 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
| rsync -azP --delete --exclude-from=.gitignore <src> <dest> |
This file contains hidden or 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
| (def mm {1 {101 :a 102 :b 103 :c} 2 {201 :aa 202 :bb}}) | |
| ;; possible cases | |
| ;; fully populated {1 {11 :a, 12 :b}, 2 {21 :a, 22 :b}} | |
| ;; single inner value {1 {12 :b}, 2 {21 :a, 22 b}} | |
| ;; empty inner value, multi-entry outer {1 {}, 2 {21 :a, 22 :b}} | |
| ;; other degenerate cases that boil down to either "the first key-value pair has data to process" or "We're done." | |
| (defn outer-inners |
OlderNewer