Skip to content

Instantly share code, notes, and snippets.

@dwardu
dwardu / Splitter.sol
Last active June 21, 2018 10:52 — forked from critesjosh/Splitter.sol
A contract to split funds between addresses. Demostrates pushing vs pulling transfers
pragma solidity ^0.4.6;
contract Splitter {
mapping(address => uint) public balances;
function unsafeSplit(address address1, address address2)
public
payable
returns(bool success)
def does_haystack_contain_needle(haystack):
for thing in haystack:
if thing == 'needle':
return True
else:
return False
print does_haystack_contain_needle(['hay', 'hay', 'hay', 'hay', 'hay'])
print does_haystack_contain_needle(['hay', 'hay', 'hay', 'needle', 'hay', 'hay'])