How to create a maximum function in haskell using pattern matching and guards
maximum' :: (Ord a) => [a] -> a maximum'  = error "maximum of empty list" maximum' [x] = x maximum' (x:xs) | x > maxTail = x | otherwise = maxTail where maxTail = maximum' xs
clojure: simplest way to open a file
If the file is small enough and can be held in memory, simplest approach is to use slurp which will return a string containing the content of the file,
clojure: How do you overwrite part of a string?
Strings in clojure are immutable.
The answer is to create a new string with the old substring replaced by a new substring:
(defn string-splice ([target new offset] (string-splice target new offset (count new))) ([target new offset length] (str (subs target 0 offset) new (subs target (+ offset length)))) )
<p>What is the result of:</p><p style="">$ git checkout -b iss53</p>
This is shorthand for:
$ git branch iss53
$ git checkout is
How to watch sphinx docs for changes and recompile them
$ pip install watchdog
$ watchmedo shell-command \
- There are 5687 results.