Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
28
Task/Function-frequency/Arturo/function-frequency.arturo
Normal file
28
Task/Function-frequency/Arturo/function-frequency.arturo
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
source: to :block read arg\0
|
||||
frequencies: #[]
|
||||
|
||||
inspectBlock: function [blk][
|
||||
loop blk 'item [
|
||||
case []
|
||||
when? [word? item][
|
||||
sItem: to :string item
|
||||
if set? sItem ->
|
||||
if function? var sItem [
|
||||
if? key? frequencies sItem ->
|
||||
set frequencies sItem (get frequencies sItem)+1
|
||||
else ->
|
||||
set frequencies sItem 1
|
||||
]
|
||||
]
|
||||
|
||||
when? [or? block? item
|
||||
inline? item] ->
|
||||
inspectBlock item
|
||||
|
||||
else []
|
||||
]
|
||||
]
|
||||
|
||||
inspectBlock source
|
||||
|
||||
inspect frequencies
|
||||
Loading…
Add table
Add a link
Reference in a new issue