Module
HTTPure.Lookup
- Package
- purescript-httpure
- Repository
- citizennet/purescript-httpure
#Lookup Source
class Lookup c k r | c -> r whereTypes that implement the Lookup class can be looked up by some key to
retrieve some value. For instance, you could have an implementation for
String Int String where lookup s i returns Just a String containing
the character in s at i, or Nothing if i is out of bounds.
Members
Instances
Lookup (Array t) Int tThe instance of
Lookupfor anArrayis just!!as defined inData.Array.Lookup (Object t) String tThe instance of
Lookupfor aObjectjust usesObject.lookup(but flipped, becauseObject.lookupexpects the key first, which would end up with a really weird API for!!).Lookup (Map CaseInsensitiveString t) String tThe instance of
Lookupfor aMap CaseInsensitiveStringconverts theStringto aCaseInsensitiveStringfor lookup.
#(!@) Source
Operator alias for HTTPure.Lookup.at (left-associative / precedence 8)
Expose at as the infix operator !@
Given some type and a key on that type, extract some value that corresponds to that key.