Question

Briefly explain why the head function is not considered “safe” in Haskell functional programming language.

Briefly explain why the head function is not considered “safe” in Haskell functional programming language.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer)

The functional programming language has a different way to work and contains the functions associated with it.

It has an operator which is the : that simply has the elements in the list and the pattern maching against the list with the head x and the tail xs are the list which has at least one element. The pattern matching can be done even when head is not executed. And as the function which is defined has resemblance with the informal description of the function hence it has semantic gap than any other languages and hence the head function are considered as not safe in Haskell function programming.

If you find the answer useful, hit the thumbs up symbol. Thanks
Hope this answer helps. :)

Add a comment
Know the answer?
Add Answer to:
Briefly explain why the head function is not considered “safe” in Haskell functional programming language.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT