Skip to content

Commit

Permalink
Print sequence of unfolded definition lazily
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasHoefer committed Aug 19, 2024
1 parent b573007 commit 56f6c97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ unfoldTerm k s h t = do
let (u, t') = headUnfold ρ t (Just k)
unless h (outputStrLn (pretty t') >> outputStrLn "")
case s of
Sequential -> outputStrLn (show u)
Sequential -> mapM_ (outputStrLn . show) u
Summed -> do
let u' = M.fromListWith (+) (map (,1::Int) u)
outputStrLn $ "Unfold counts: " ++ intercalate ", " [ show x ++ ": " ++ show c | (x, c) <- M.toList u']
Expand Down

0 comments on commit 56f6c97

Please sign in to comment.