Module
HTTPure.Lookup
- Package
- purescript-httpure
- Repository
- citizennet/purescript-httpure
#Lookup Source
class Lookup c k r | c -> r where
Types 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 t
The instance of
Lookup
for anArray
is just!!
as defined inData.Array
.Lookup (Object t) String t
The instance of
Lookup
for aObject
just usesObject.lookup
(but flipped, becauseObject.lookup
expects the key first, which would end up with a really weird API for!!
).Lookup (Map CaseInsensitiveString t) String t
The instance of
Lookup
for aMap CaseInsensitiveString
converts theString
to aCaseInsensitiveString
for 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.