List (Pair (’A) (’B))to
Map (’A) (’B)in Scilla ?
let init_map = Emp ('A) ('B) inin Savant.)
let list_to_map = tfun 'A => tfun 'B => fun (pairs_list : List (Pair ('A) ('B))) => let init_map = Emp ('A) ('B) in let iter = fun (acc : Map ('A) ('B)) => fun (cur : Pair ('A) ('B)) => let fst_impl = @fst ('A) ('B) in let snd_impl = @snd ('A) ('B) in let k = fst_impl cur in let v = snd_impl cur in builtin put acc k v in let folder = @list_foldl (Pair ('A) ('B)) (Map ('A) ('B)) in folder iter init_map pairs_list
Maptype constructor cannot be applied to a type variable. Maps require their key types to have some structure as we need to be able to hash the values of the key type. And just a generic
’Atype does not provide this ability.
_selfreserved constant that is set at intialization.
datain the Scilla web IDE unfortunately. That can only be done natively on the Scilla binary by specifying
ByStras the type. A workaround is to use the function
builtin to_bystr hto convert the argument you input from
ByStr52 -> ByStr.
Could I use Run-time Errors expression for scilla in savant ide or test-net ?
I tried it, but it seemed unusable.
v0.3.0which is the version running on mainnet and testnet. Let me check with the scilla team on the savant ide binary version.
Hey everybody, we'll be having our second dev community call this Thursday! Join in if you can (we'll have a recording as well):
Gary Mensah is inviting you to a scheduled Zoom meeting.
Topic: Zilliqa Dev Community Call #2
Time: Sep 5, 2019 09:30 PM Singapore
Join Zoom Meeting
One tap mobile
+16465588656,,311147972# US (New York)
+17207072699,,311147972# US (Denver)
Dial by your location
+1 646 558 8656 US (New York)
+1 720 707 2699 US (Denver)
Meeting ID: 311 147 972
Find your local number: https://zoom.us/u/aduFNnTYoL