к
Size: a a a
MK
DB
MK
DB
DB
AA
K
fooBar x
| let y = x + 42
, let z = x - 15
, z + y < 100
, let sx = show x
, let ss = show (y * z)
, length sx == 2 * length ss
= ...
fooBar x
| ...
...
вот такое вот видел, да ещё с портянками по несколько экранов у каждого клозаclosure :: Ord t => Table t -> Set (State t) -> Set (State t)
closure (Table rules) = close $ foldMap \state ->
case locus state of
Just (NT nt) -> Set.fromList [firstState rule | rule <- rules, rule.name == nt]
_ -> mempty
goto :: Ord t => Table t -> Set (State t) -> t -> Set (State t)
goto rules (Set.toList -> states) t =
mconcat
[ closure rules $ possible Set.ofOne following
| state <- states
, locus state == Just (T t)
, let following = next state
]