Skip to content

Instantly share code, notes, and snippets.

--!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},
}
I am sharing code
indentation is as intended
type Item (ListN n a) = a
```haskell
type Item (ListN n a) = a
```
```
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
compileErrorGiveMeType :: ()
compileErrorGiveMeType = getUpdateTimes
@minimapletinytools
minimapletinytools / auction.sol
Created May 22, 2018 01:29
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
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;