-
Notifications
You must be signed in to change notification settings - Fork 0
Iterators
João Pedro Neto edited this page Nov 11, 2020
·
4 revisions
An iterator connects to a variable assigned to a list or string and is able to cycle thru its elements/characters.
Eg: 3┅ẇ
defines variable w
initializing it with list [1,2,3]
Using iterator ẉ
we are able to iterate thru the list
Eg: '3┅ẇ 5{ẉ,}R'
outputs 1 2 3 1 2
To apply an iterator only variables wyz
can be used.
Notice that w
still has the entire list, so w,
outputs [1,2,3]