allpop last to first. A foreach that empties as it goes
popall first to last. A foreach that empties as it goes
asteps. array steps. first to last.
stepsa. array steps last to first
arraysteps runs for 'gap between elements' there's no current loopvar just prev and next
array sort. small -> large
reverse sort. large -> small
acontains array a contains array b bool return. all contained or false
acontained array a contained within array b bool return. all contained or false
acontainscount array a contains array b count. number of matches
acontainedcount array a contained within array b count. number of matches
array flip. flips order forward/backwards
full page desc content
expression vars
expression vars hold expressions,
we ONLY define simple usage here
we do NOT address expressions containing expressions vars, or any other complex applications
Yes! introducing expression vars opens the door to a lot of questions... "how do I put the value from a variable into an expression as a fixed value instead of variable reference?" how do I build a dynamic expression then lock it down so I can now change the vars used to create it? etc..
the answer is "Those are questions for another day.. those behaviors are undefined for today"
pop loops - they popall elements and handle each. There is still a 'if true dot' on the sub brak becaus ethsi way we can add a false one to run at the end.
Pop loops are different from foreach loops, pop loops empty the original array, this means they can better represent situation when things are handle or processed. Many physical process of "take all of X and process them" convert or destroy the original source material.So this is actually a useful distinction for abstracting into language.
array sorts simple value sorts on simple 1d arrays for now
later can add bracketing and nuance to sorting
array sort example is just an example of an array unsorted and sorted. should add full algorithm description
*show*
ex1 ex2 ex3 ex4 ex5 :: expression vars hold expressions
exp (_60 v_20 ) :: expression holding braket
allpop( . . . .. _3 . . . ) :: allpop last to first. A foreach that empties as it goes
popall ( . . . .. _3 . . . ) :: popall first to last. A foreach that empties as it goes
asteps( . . . .. _3 . . . ) :: asteps. array steps. first to last.
stepsa ( . . . .. _3 . . . ) :: stepsa. array steps last to first
_1 :: arraysteps runs for 'gap between elements' there's no current loopvar just prev and next
sort :: array sort. small -> large , sortr :: reverse sort. large -> small
acontains :: acontains array a contains array b bool return. all contained or false
acontained :: acontained array a contained within array b bool return. all contained or false
acontainscount :: acontainscount array a contains array b count. number of matches
acontainedcount :: acontainedcount array a contained within array b count. number of matches
aflip :: array flip. flips order forward/backwards