You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a syntactic sugar for creating a sequence of elements corresponding to a particular field in a sequence of records. For example, the following syntax works in Cryptol, but not in SAW:
sawscript> print [{a = 1, b = true}, {a = 2, b = false}].a
Thank you!
The text was updated successfully, but these errors were encountered:
We don't have any syntactic sugar like that in saw-script at the moment. One possible workaround is to define a saw-script map function, and then use that to map a field projection over all the elements of a list.
rec map f xs = if null xs then [] else concat [f (head xs)] (map f (tail xs));
Is there a syntactic sugar for creating a sequence of elements corresponding to a particular field in a sequence of records. For example, the following syntax works in Cryptol, but not in SAW:
Thank you!
The text was updated successfully, but these errors were encountered: