comment and strict foldl'
This commit is contained in:
parent
5c786f5430
commit
b6b95b9af1
@ -1,5 +1,7 @@
|
|||||||
module Push where
|
module Push where
|
||||||
|
|
||||||
|
import Data.List (foldl')
|
||||||
|
|
||||||
-- import Debug.Trace (trace, traceStack)
|
-- import Debug.Trace (trace, traceStack)
|
||||||
|
|
||||||
-- GeneModular or Gene?
|
-- GeneModular or Gene?
|
||||||
@ -79,6 +81,8 @@ intAdd state =
|
|||||||
-- this would change Gene to something like GeneModular above.
|
-- this would change Gene to something like GeneModular above.
|
||||||
|
|
||||||
-- Wow, a one-liner for interpreting a paretheses-free genome...
|
-- Wow, a one-liner for interpreting a paretheses-free genome...
|
||||||
|
-- Does not handle any data elements in genome yet,
|
||||||
|
-- but condition could be added to the lambda.
|
||||||
-- Need to update this when adding parethetical blocks too.
|
-- Need to update this when adding parethetical blocks too.
|
||||||
interpretGenome :: State -> [(State -> State)] -> State
|
interpretGenome :: State -> [(State -> State)] -> State
|
||||||
interpretGenome state = foldl (\acc f -> f acc) state
|
interpretGenome state = foldl' (\acc f -> f acc) state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user