Skip to content

Instantly share code, notes, and snippets.

View Nimrod0901's full-sized avatar
🎯
Focusing

Nimrod Nimrod0901

🎯
Focusing
View GitHub Profile
@Nimrod0901
Nimrod0901 / simpleSet.hs
Last active June 13, 2019 05:15
Simple Set
{-
Simple version of set data structure.
Inspired by CSE130 sp18 final.
-}
data Set a = Set (a -> Bool)
showSet :: (Show a) => Set a -> String
showSet _ = "Actually you can't show this because it you will never know what contains here"
@Nimrod0901
Nimrod0901 / diff.py
Created May 7, 2019 17:22
Fast Diff Two Dicts
def diff(fst, sct):
sub = [key: sct[key] for key in set(sct) - set(fst)]
add = [key: sct[key] for key in set(fst) - set(scd)]
print("+:{} \n -:{}".format(add, sub))
return add, sub