Array.fold()
Revision as of 11:08, 16 February 2020 by Joseph (talk | contribs) (Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...")
Array.fold(SomeAtFoldValue, SomeAtReverseFoldValue)
For the corresponding SomeAtFoldValue (and SomeAtReverseFoldValue), fold the array into subarrays if the value in the array element matches the given fold value. "a+[a+b]"
.split("") .fold("[").print()
[a,+, [[,a,+,b,] ] ]
(Compare this to the original string "a+[a+b]")