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 distinct-by | |
"Returns a lazy sequence of the elements of coll, removing duplicates of (f item). | |
Returns a stateful transducer when no collection is provided." | |
{:added "1.0"} | |
([f] | |
(fn [rf] | |
(let [seen (volatile! #{})] | |
(fn | |
([] (rf)) | |
([result] result) |
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
### Keybase proof | |
I hereby claim: | |
* I am brsunter on github. | |
* I am bsunter (https://keybase.io/bsunter) on keybase. | |
* I have a public key whose fingerprint is B645 9886 0C4B 4D32 0808 4F92 6DCA DB61 0750 9E0A | |
To claim this, I am signing this object: |
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
data Circuit = Signal Word16 | |
| Wire Label | |
| AndGate Circuit Circuit | |
| OrGate Circuit Circuit | |
| LShiftGate Int Circuit | |
| RShiftGate Int Circuit | |
| NotGate Circuit deriving (Eq, Show, Ord) | |
newtype Label = Label String deriving (Show, Ord, Eq) |
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
module Base10M | |
(encode | |
,decode) where | |
import Data.List(elemIndex) | |
import Data.Maybe(fromJust) | |
unicodes = ['a'..] | |
numOfUnicodes = toInteger $ length unicodes |
NewerOlder