From 6dbf4e79051ac03655e3321bdb26d8488dbc72d4 Mon Sep 17 00:00:00 2001 From: Rowan Torbitzky-Lane Date: Sun, 19 Jan 2025 20:56:34 -0600 Subject: [PATCH] comments --- src/Instructions/GenericInstructions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Instructions/GenericInstructions.hs b/src/Instructions/GenericInstructions.hs index 3513a95..835f510 100644 --- a/src/Instructions/GenericInstructions.hs +++ b/src/Instructions/GenericInstructions.hs @@ -81,7 +81,6 @@ deleteAt idx xs = take idx xs <> drop 1 (drop idx xs) -- Is this optimal? Running instrucitonYankDup twice????? -- int non generic too instructionYank :: forall a. State -> Lens' State [a] -> State --- instructionYank state accessor = instructionYankDup state accessor & accessor .~ init (view accessor (instructionYankDup state accessor)) instructionYank state@(State {_int = rawIndex : _}) accessor = let myIndex :: Int @@ -98,6 +97,7 @@ combineTuple :: a -> ([a], [a]) -> [a] combineTuple val tup = fst tup <> [val] <> snd tup -- int non generic :( +-- Rewrite this eventually? instructionShoveDup :: State -> Lens' State [a] -> State instructionShoveDup state@(State {_int = i : is}) accessor = if notEmptyStack state accessor