What command extracts elements except first one from a list


Problem

Haskell list

1. What command extracts the elements except the last one from a list
2. What command extracts the elements except the first one from a list
3. What command Takes elements of a list
4. What command drops elements of a list
5. What command drops until first element does not match condition
6. What command Takes until first element does not match condition
7. How many elements are in [1..10]
8. How many elements are in [2,4..8]

• take 5 (cycle [1, 2, 3])
• take 5 (repeat 3)
• 1 'elem' [1,2,3] returns:

6 tuples
• fst (1, True)
• snd (1, True)
• zip [1 .. 3] ["one", "two", "three"]
7 compare
• compare 5 3
• compare 3 5
• compare 5 5
8 anonymous functions
• λx- > x + 5
• (((λxy- > (2 ∗ x + y)5)6)
9 filter, map and reduce
• sum $ map (*2) [1..6]
• (sum $ filter (> 5) $ map (* 2) [1 .. 5])
10 composition
• map (negate . abs) [1, 2, -3, 4, 5]
11 types
• To new we use the word
• To crreate a type alias
12 fmap and monads
• fmap (* 2) [1 .. 3]
• fmap (++ " HEY GUYS") (Just "Something serious.")
• fmap (++ " HEY GUYS") Nothing
13 monad laws
• fmap id (Just 3)
• id (Just 3)
~fmap id (Nothing Maybe Bool)~
~fmap id ([] [Int])~
• fmap ((f -> f 2) . (*)) (Just 3)
14 monad and applicative inline notations
• (*) Just 3
• fmap (: []) (Just 4)
• liftA2 (:) (Just 3) (Just [4])
• ((:) Just [4])
15 monoids
• "one" 'mappend' "two" 'mappend' "tree

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What command extracts elements except first one from a list
Reference No:- TGS03256276

Expected delivery within 24 Hours