Skip to content

Instantly share code, notes, and snippets.

View purefunctor's full-sized avatar
🎯
New Goals

Justin Garcia purefunctor

🎯
New Goals
View GitHub Profile
"""
Use this file to write your solution for the Summer Code Jam 2020 Qualifier.
Important notes for submission:
- Do not change the names of the two classes included below. The test suite we
will use to test your submission relies on existence these two classes.
- You can leave the `ArticleField` class as-is if you do not wish to tackle the
advanced requirements.
# switch_0.py
# Runs actions/values as they are found
class FirstMatchFound(Exception):
pass
class InvalidResultTypeError(Exception):
pass
import functools
import types
def attrfunc(func=None, **attrs):
if not func:
return functools.partial(attrfunc, **attrs)
return AttrFunc(func, **attrs)
class AttrFunc:
def __init__(self, func, **attrs):

Lazy and Strict Maps in Haskell

import           Control.Concurrent

import           Data.Map.Lazy                 as LM
import           Data.Map.Strict               as SM

import System.IO.Unsafe