Skip to content

Commit

Permalink
remove JSON literals from parallel-letter-frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed May 16, 2024
1 parent 0748804 commit 9fb09d5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ needs array/parallel
;

: letter-frequencies \ s -- m
s:lc letters ( dup -rot increment-frequency ) {} const a:reduce
s:lc letters ( dup -rot increment-frequency ) m:new const a:reduce
;

: merge-frequencies \ a -- m
( ( >r dup -rot 0 m:@? r> n:+ rot swap m:! ) m:each drop ) {} const a:reduce
( ( >r dup -rot 0 m:@? r> n:+ rot swap m:! ) m:each drop ) m:new const a:reduce
;

: >frequencies \ a -- m
Expand Down

0 comments on commit 9fb09d5

Please sign in to comment.