úΰV     (c) Zoltan Kelemen 2017  BSD-style kelemzol@elte.hu SafeAQRT PHelper heterogeneous list for comfortable HtsSet building (with append and fill) Èlet hs = fill ("a" :+ 'c' :+ True :+ ()) lookup hs == Just 'c' use () to close the list lookup hs == Just () -- is False! let hs' = fill ("a" :+ 'c' :+ True :+ () :+ ()) lookup hs' == Just () -- is OkThe empty HtsSetA HtsSet with an elementIs the HtsSet is empty? 0null empty == True null (singleton "a") == False$The number of elements in the HtsSet )size empty == 0 size (singleton "a") == 1 -The HtsSet is contain a same type of element? dmember (Proxy :: Proxy String) empty == False member (Proxy :: Proxy String) (singleton "a") == True 1The HtsSet is not contain a same type of element? ”Insert a new value in the HtsSet. If the a elem is already present in the HtsSet with type, the associated value is replaced with the supplied value 3insert "a" $ insert (2 :: Int) $ insert 'c' $ empty !Lookup a value from in the HtsSet Àlet hs = insert "a" $ insert (2 :: Int) $ insert 'c' $ empty lookup hs == Just "a" lookup hs == Just (2 :: Int) but lookup hs == Just 2 -- is False! Because the type of 2 is Num t => t not Int 6Lookup a value from in the HtsSet with a default valueUpdate a value in HtsSet plet hs = insert "a" $ insert (2 :: Int) $ insert 'c' $ empty let hs' = update (++"b") hs lookup hs' == Just "ab"-The HtsSet is contain a same type of element? \let hs = insert "a" $ insert (2 :: Int) $ insert 'c' $ empty existTypeOf "string" hs == True8The HtsSet is contain a same type of element? (by proxy)    55     %htlset-0.1.0.0-1B42nuquJaq5tvlIt0L1f6 Data.HtsSetAppendappend:+HtsSetempty singletonnullsizemember notMemberinsertlookuplookupWithDefaultupdate existTypeOf existTypeOfPfill $fAppend() $fAppend:+unHSCastBoxunBox mapCastBox