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
--!strict | |
-- bimap implementation in Lua | |
-- same as the other bimap, except with the prototype pattern (so functions only need to be allocated once) | |
-- doesn't work due to typeof(setmetatable({} :: BimapData<K,V>, {} :: BimapImpl<K,V> & BimapMT<K,V>)) not propogating the types down | |
type BimapData<K,V> = { | |
forwardMap : {[K] : V}, | |
backwardMap : { [V] : K}, | |
} |
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
I am sharing code | |
indentation is as intended |
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
type Item (ListN n a) = a |
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
```haskell | |
type Item (ListN n a) = a | |
``` |
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
``` | |
Network.Ethereum.ABI.Prim | |
Network.Ethereum.ABI.Prim.Address | |
Network.Ethereum.ABI.Prim.Bool | |
Network.Ethereum.ABI.Prim.Bytes | |
Network.Ethereum.ABI.Prim.Int | |
Network.Ethereum.ABI.Prim.List | |
Network.Ethereum.ABI.Prim.String | |
Network.Ethereum.ABI.Prim.Tagged | |
Network.Ethereum.ABI.Prim.Tuple |
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
compileErrorGiveMeType :: () | |
compileErrorGiveMeType = getUpdateTimes |
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
pragma solidity ^0.4.0; | |
contract auction { | |
// An auction contract written in Solidity | |
// Can be deployed similarly to what is described at: | |
// https://dappsforbeginners.wordpress.com/tutorials/your-first-dapp/ | |
// Initialization. | |
// Remembering bids from each address. | |
mapping (address => uint) bids; |