Question
Write an Elixir function to solve each of the problems below. Each function will accept a list as input and return either a Boolean value
Write an Elixir function to solve each of the problems below. Each function will accept a list as input and return either a Boolean value or another list, depending on the question. For this part of the lab, you may not use branching or repetition of any kind. No recursion, no if/else, no indexing. Head and tail will serve you well here.
1) isCoordinate Return True if the input list could represent a coordinate otherwise return false. A coordinate has two elements and they are both numbers.
2) helloIfSo If the input list contains the string Hello, remove it and place it at the end of the list. If it does not contain Hello, add it to the end of the list.
Write in Elixir
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started