Add getSpace utility function
This commit is contained in:
parent
64fd7d3afc
commit
42ec44a6f8
|
@ -26,7 +26,8 @@ gol r p s = EnvT r $ StoreT (Identity s) p
|
|||
gol' :: DisplayableSpace f => Rule -> f a -> GOL f a
|
||||
gol' r = gol r (0, 0)
|
||||
|
||||
|
||||
getSpace :: GOL f a -> f a
|
||||
getSpace (EnvT _ (StoreT (Identity s) _)) = s
|
||||
|
||||
getNeighbors :: forall f a. Space f => GOL f a -> [a]
|
||||
getNeighbors = experiment $ neighbors @f
|
||||
|
|
Loading…
Reference in a new issue