I hereby claim:
- I am zlotnleo on github.
- I am zlotnleo (https://keybase.io/zlotnleo) on keybase.
- I have a public key whose fingerprint is E68E 9386 5196 13D9 608C EE73 F3EE 9DBA C529 5C97
To claim this, I am signing this object:
import heapq | |
import itertools | |
from dataclasses import dataclass, field | |
def primes(): | |
@dataclass(init=True, order=True) | |
class Element: | |
key: int = field(compare=True) | |
nums: any = field(compare=False) |
I hereby claim:
To claim this, I am signing this object:
val _ = use "Set.sml"; | |
functor Automata(eqtype alpha) :> | |
sig | |
type nfa | |
type dfa | |
type regex | |
val Union : regex * regex -> regex | |
val Concat : regex * regex -> regex |
datatype 'a tree = | |
Lf | |
| Db of 'a tree * 'a * 'a tree | |
| Tr of 'a tree * 'a * 'a tree * 'a * 'a tree | |
| Qd of 'a tree * 'a * 'a tree * 'a * 'a tree * 'a * 'a tree | |
fun get Lf _ = raise Subscript | |
| get (Db(t1, (k1, v1), t2)) k = | |
if k < k1 then get t1 k | |
else if k = k1 then v1 |
datatype player = X | O; | |
datatype cell = Nil | Cell of player; | |
datatype state = Win of player | Draw; | |
exception IllegalState; | |
val newboard = List.tabulate (9, fn _ => Nil); | |
fun getNext [] _ = [] | |
| getNext (Nil::cs) p = ((Cell p)::cs) :: map (fn l => Nil::l) (getNext cs p) | |
| getNext (c::cs) p = map (fn l => c::l) (getNext cs p) |