Re: [Haskell-beginners] Beginners Digest, Vol 139, Issue 2

If the goal is to filter a list for numbers which are multiples of some
other number, perhaps the =mod= function would be a neater way to do this.
It is part of the Prelude with documentation here:
https://hackage.haskell.org/package/base-4.12.0.0/docs/Prelude.html#v:mod
On Thu, Jan 9, 2020 at 12:01 PM
Send Beginners mailing list submissions to beginners@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-request@haskell.org
You can reach the person managing the list at beginners-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..."
Today's Topics:
1. why doesn't this work? (Alexander Chen) 2. Re: why doesn't this work? (Oliver Charles) 3. Re: why doesn't this work? (Ut Primum)
----------------------------------------------------------------------
Message: 1 Date: Wed, 8 Jan 2020 16:01:20 +0100 (CET) From: Alexander Chen
To: beginners@haskell.org Subject: [Haskell-beginners] why doesn't this work? Message-ID: <675050120.318296.1578495680883@ichabod.co-bxl> Content-Type: text/plain; charset="utf-8" hi,
for a List comprehension I want to only include the integers of a division. In my beginners mind this should work:
(round (x / y)) == (x / y)
however, i get a nontrivial error blurp.
what am i doing wrong?
best,
Alexander
participants (1)
-
Alex Zarebski