Last active
August 29, 2015 14:02
-
-
Save lessless/058cd060bfce30b37951 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% A customer enters, sees our menu and asks if he could have the prices of all the items costing between $3 and $10 with taxes % (say 7%) counted in afterwards. | |
3> RestaurantMenu = [{steak, 5.99}, {beer, 3.99}, {poutine, 3.50}, {kitten, 20.99}, {water, 0.00}]. | |
[{steak,5.99}, | |
{beer,3.99}, | |
{poutine,3.5}, | |
{kitten,20.99}, | |
{water,0.0}] | |
4> [{Item, Price*1.07} || {Item, Price} <- RestaurantMenu, Price >= 3, Price =< 10]. | |
[{steak,6.409300000000001},{beer,4.2693},{poutine,3.745}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment