delete -package:unordered-containers

delete x removes the first occurrence of x from its list argument. It is a special case of deleteBy, which allows the programmer to supply their own equality test.

Examples

>>> delete 'a' "banana"
"bnana"
>>> delete "not" ["haskell", "is", "not", "awesome"]
["haskell","is","awesome"]
Delete a key and its value from the map. When the key is not a member of the map, the original map is returned.
delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
delete 5 empty                         == empty
Delete a value in the set. Returns the original set when the value was not present.
Delete a key and its value from the map. When the key is not a member of the map, the original map is returned.
delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
delete 5 empty                         == empty
Delete an element from a set.
Remove the mapping for the specified key from this map if present.
Delete a key and its value from the map. When the key is not a member of the map, the original map is returned.
delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
delete 5 empty                         == empty
Delete a value in the set. Returns the original set when the value was not present.
Delete a specific record by identifier. Does nothing if record does not exist.

Example usage

With schema-1 and dataset-1,
deleteSpj :: MonadIO m => ReaderT SqlBackend m ()
deleteSpj = delete spjId
The above query when applied on dataset-1, will produce this:
+-----+------+-----+
|id   |name  |age  |
+-----+------+-----+
|2    |Simon |41   |
+-----+------+-----+
Remove an element of the given keys from the metadatas. If not present does nothing.
Issue a DELETE request. Example:
delete "http://httpbin.org/delete"

>>> r <- delete "http://httpbin.org/delete"

>>> r ^. responseStatus . statusCode
200
Session-specific version of delete.
delete = addroute DELETE
delete = addroute DELETE
Builds an HTTP "DELETE" request with the given query parameters. Example:
ghci> :set -XOverloadedStrings
ghci> import qualified Data.Map as M
ghci> buildRequest $ delete "/foo/bar" M.empty
DELETE /foo/bar HTTP/1.1
host: localhost

sn="localhost" c=127.0.0.1:60000 s=127.0.0.1:8080 ctx=/ clen=n/a
Delete all key-value pairs associated with the given key from the headers map. Example:
ghci> :set -XOverloadedStrings
ghci> H.delete "accept" $ H.fromList [("Accept", "text/plain")]
H {unH = []}
Deletes a key-value mapping from a hash table. O(n) worst case, O(1) amortized.
See the documentation for this function in delete.