comment and strict foldl'

This commit is contained in:
Taylor 2025-01-14 02:55:16 -06:00
parent 5c786f5430
commit b6b95b9af1

View File

@ -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