On Fri, Jun 20, 2008 at 07:57:58AM +0200, Ketil Malde wrote:
Albert Y. C. Lai [EMAIL PROTECTED] writes:
While we are kind of on this topic, what makes the characters ħ þ
prefix operator by default, while º and most other odd ones infix?
alphanumeric vs non-alphanumeric
Testing this,
After some fiddling with this style, here is what I came up with
for the 8 queens problem in the 99 problem set. It's quite entertaining ...
( note: it's brute force and requires a combination library )
queens2 n = n.permutations.filter all_satisfied where
all_satisfied queens = queens.diff_col
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Isn't this (roughly?) the same as flip ($)?
As a side note, may I advise you to use another symbol, and leave the
poor dot alone?
On Thu, 2008-06-19 at 11:33 +0800, jinjing wrote:
Hi guys,
This is my second attempt to learn Haskell :)
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Note that if you redefine (.) composition to be
On 2008.06.19 11:33:56 +0800, jinjing [EMAIL PROTECTED] scribbled 0.5K
characters:
Hi guys,
This is my second attempt to learn Haskell :)
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
So for example, 99
* On Thursday, June 19 2008, Ketil Malde wrote:
As a side note, may I advise you to use another symbol, and leave the
poor dot alone? Overloading it as a module separator is bad enough.
If you have a keyboard that allows greater-than-ascii input, there are
plenty of options: « » ¡ £ ¥ ł € ® ª...
2008/6/19 jinjing [EMAIL PROTECTED]:
encode xs = xs.group.map token where token x = (x.length, x.head)
Working in this direction is a question of taste, but the choice of
the dot for the operator is a pretty bad idea...
On the other hand, my favourite would be :
encode = map (length head) .
On Thu, Jun 19, 2008 at 3:35 AM, Ketil Malde [EMAIL PROTECTED] wrote:
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
(.) :: a - (a - b) - b
a . f = f a
infixl 9 .
Isn't this (roughly?) the same as flip ($)?
As a side
Adam Vogt wrote:
While we are kind of on this topic, what makes the characters ħ þ prefix
operator by default, while º and most other odd ones infix?
alphanumeric vs non-alphanumeric
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Thu, 2008-06-19 at 15:24 -0400, Brent Yorgey wrote:
On Thu, Jun 19, 2008 at 3:35 AM, Ketil Malde [EMAIL PROTECTED] wrote:
jinjing [EMAIL PROTECTED] writes:
Any way here's the code:
module Dot where
import Prelude hiding ( (.) )
Albert Y. C. Lai [EMAIL PROTECTED] writes:
While we are kind of on this topic, what makes the characters ħ þ
prefix operator by default, while º and most other odd ones infix?
alphanumeric vs non-alphanumeric
Testing this, I find that isAlpha is True also for 'º', but as the OP
claims,
11 matches
Mail list logo