<HTML><BODY>
 &nbsp;<span class="Apple-style-span" style="font-family: Verdana; font-size: 12px; ">I have a homework which is very important to be done but I can't complete the task at all. The program i should write is:</span><div sourceindex="436" style="font-family: Verdana; font-size: 12px; "><br sourceindex="437"></div><div sourceindex="438" style="font-family: Verdana; font-size: 12px; "><x_span class="Apple-style-span" sourceindex="439" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="440">Make calculator-</x_span></x_span><x_span class="Apple-style-span" sourceindex="441" style="font-family: arial, sans-serif; font-size: 16px; ">function in</x_span><x_span class="Apple-style-span" sourceindex="442" style="font-family: arial, sans-serif; font-size: 16px; ">&nbsp;Haskell.</x_span></div><div sourceindex="443" style="font-family: Verdana; font-size: 12px; "><x_span class="Apple-style-span" sourceindex="444" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="445">The function argument is a list of strings and also form such&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="446" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="447">list, as each string of the argument made definite action.<br sourceindex="448"></x_span></x_span><x_span class="Apple-style-span" sourceindex="449" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="450">• If the string has the form of an arithmetic expression - calculate this&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="451" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="452">expression.&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="453" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="454">The string result becomes part of the list-</x_span></x_span><x_span class="Apple-style-span" sourceindex="455" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="456">result.&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="457" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="458">If the expression contains a variable which is not&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="459" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="460">assigned value, the result is displayed "undefined".<br sourceindex="461"></x_span></x_span><x_span class="Apple-style-span" sourceindex="462" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="463">• If the string has the form<br sourceindex="464"></x_span></x_span><x_span class="Apple-style-span" sourceindex="465" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="466">Name =&nbsp;</x_span></x_span></div><div sourceindex="467" style="font-family: Verdana; font-size: 12px; "><x_span class="Apple-style-span" sourceindex="468" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="469"></x_span></x_span><x_span class="Apple-style-span" sourceindex="470" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="471">value calculated from the last expression is&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="472" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="473">assigned to the variable with the corresponding name in the list, and in the result list</x_span></x_span><x_span class="Apple-style-span" sourceindex="474" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="475">&nbsp;is formed a string with type<br sourceindex="476"></x_span></x_span><x_span class="Apple-style-span" sourceindex="477" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="478">name = ...<br sourceindex="479"></x_span></x_span><x_span class="Apple-style-span" sourceindex="480" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="481">where the site stands blank corresponding value.<br sourceindex="482"></x_span></x_span><x_span class="Apple-style-span" sourceindex="483" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="484">If there is not a calculated expression to be assigned to form a&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="485" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="486">string "no value".<br sourceindex="487"></x_span></x_span><x_span class="Apple-style-span" sourceindex="488" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="489">• If the string is non-blank, but there is a species different from the above two&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="490" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="491">case, form the string "error".<br sourceindex="492"></x_span></x_span><x_span class="Apple-style-span" sourceindex="493" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="494">• If the string is empty, incl.&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="495" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="496">when it contains only spaces, in the result there is</x_span></x_span><x_span class="Apple-style-span" sourceindex="497" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="498">&nbsp;not form a string.<br sourceindex="499"></x_span></x_span><x_span class="Apple-style-span" sourceindex="500" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="501">Expressions consist of integers without sign variables, operations&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="502" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="503">+ (Addition), - (subtraction), * (multiplication) and / (divide) and parentheses.&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="504" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="505">Where no brackets, the operations are performed from left to right, but * and /&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="506" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="507">precede the + and -.&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="508" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="509">Implementation of any operation gives integer;&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="510" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="511"><x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="512">in</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="513">the division</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="514">rejected</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="515">the fractional</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="516">part</x_span><x_span title="Кликнете за алтернативни преводи" class="" sourceindex="517">, if</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="518">any</x_span>.<br sourceindex="519"></x_span></x_span><x_span class="Apple-style-span" sourceindex="520" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="521"><x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="522">Variables</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="523">have</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="524">names</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="525">of</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="526">one</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="527">letter</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="528">-</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="529">from the</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="530">Latin</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="531">small</x_span>&nbsp;<x_span class="hps" title="Кликнете за алтернативни преводи" sourceindex="532">letter</x_span><x_span title="Кликнете за алтернативни преводи" sourceindex="533">.</x_span>&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="534" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="535">In the beginning, end or between the elements of each row can have&nbsp;</x_span></x_span><x_span class="Apple-style-span" sourceindex="536" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="537">spaces - they are irrelevant to its correctness.<br sourceindex="538"></x_span></x_span><x_span class="Apple-style-span" sourceindex="539" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="540">Example: the list-argument<br sourceindex="541"></x_span></x_span><x_span class="Apple-style-span" sourceindex="542" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="543">["3 +7 / 2" "2 + x", "= s", "2 * s +4", "", "2 + +4 / 5]<br sourceindex="544"></x_span></x_span><x_span class="Apple-style-span" sourceindex="545" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="546">function should provide a result-list<br sourceindex="547"></x_span></x_span><x_span class="Apple-style-span" sourceindex="548" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="549">["6", "undefined", "s = 6", "16", "error"].</x_span></x_span></div><div sourceindex="550" style="font-family: Verdana; font-size: 12px; "><x_span class="Apple-style-span" sourceindex="551" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="552"><br sourceindex="553"></x_span></x_span></div><div sourceindex="554" style="font-family: Verdana; font-size: 12px; "><x_span class="Apple-style-span" sourceindex="555" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="556"><br sourceindex="557"></x_span></x_span></div><div sourceindex="558" style="font-family: Verdana; font-size: 12px; "><x_span class="Apple-style-span" sourceindex="559" style="font-family: arial, sans-serif; font-size: 16px; "><x_span title="" sourceindex="560">Thank you an advance!</x_span></x_span></div></BODY></HTML>