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
defmodule Identicon do | |
@moduledoc """ | |
Documentation for Identicon. | |
""" | |
@doc """ | |
Hello world. | |
## Examples |
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
(defn- pos-volume | |
[num] | |
(if (pos? num) num 0)) | |
(defn- click-volume-down-btn | |
"Turn it down you kids!" | |
[js-evt] | |
(let [new-volume (- js-evt 1)] | |
(swap! *app-state assoc :volume (pos-volume new-volume)))) | |
;; TODO: write me |
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
(defn- pos-volume | |
[num] | |
(if (pos? num) num 0)) | |
(defn- click-volume-down-btn | |
"Turn it down you kids!" | |
[js-evt] | |
(let [new-volume (- js-evt 1)] | |
(swap! *app-state assoc :volume (pos-volume new-volume)))) |
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
(defn- click-vol-down | |
[evt] | |
(let [new-vol (- evt 1)] | |
(swap! *app-state assoc :volume new-vol))) |
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
# Table of Contents | |
- [Table of Contents](#table-of-contents) | |
- [Louise](#louise) | |
- [All contracts over 150k](#all-contracts-over-150k) | |
- [10 Longest running contracts](#10-longest-running-contracts) | |
- [Quarterly](#quarterly) | |
- [Funded Contracts](#funded-contracts) | |
- [How long was contract in each stage](#how-long-was-contract-in-each-stage) |
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
//--Write your own map() function | |
// | |
//--Input: array, callback funtion | |
// | |
//--Output: new array where every element is transformed by the callback function | |
const map = (array, callback) => { | |
let newArr = []; | |
for (var i = 0; i < array.length; i++) { | |
newArr[i] = callback(array[i], i) |
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
from dataclass import dataclass, field | |
from typing import List | |
RANKS = '2 3 4 5 6 7 8 9 10 J Q K A'.split() | |
SUITS = '♣ ♢ ♡ ♠'.split() | |
def make_french_deck(): | |
return [PlayingCard(r,s) for s in SUITS for r in RANKS] | |
@dataclass(order=True) |
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
(ns hobbit) | |
(defn asym-hobbit-body-parts [{:name "head" :size 3} | |
{:name "left-eye" :size 1} | |
{:name "left-ear" :size 1} | |
{:name "mouth" :size 1} | |
{:name "nose" :size 1} | |
{:name "neck" :size 2} | |
{:name "left-shoulder" :size 3} | |
{:name "left-upper-arm" :size 3} |
NewerOlder