Skip to content

Commit c4c54eb

Browse files
committed
[ refactor ] simpler definition of allNats
1 parent 49a343b commit c4c54eb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Generic/Semantics/Printing.agda

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ module _ {I : Set} {d : Desc I} where
111111
$′ 'a' ∷ toList "bcdefghijklmnopqrstuvwxyz"
112112

113113
allNats : Stream ℕ _
114-
allNats = cofix (λ i Stream ℕ i) step 0 where
115-
step : {i} Thunk _ i Stream ℕ i
116-
step rec k = k ∷ λ where .force rec .force (suc k)
114+
allNats = Stream.unfold < id , suc > 0
117115

118116
names : Stream String _
119117
names = Stream.concat

0 commit comments

Comments
 (0)