colors - Haskell RGB to CMYK -


rgb2cmyk r g b = ((w - (r/255))/w,(w - (g/255))/w,(w - (b/255))/w,k = 1 - w)               w = max(r/255,g/255,b/255)  

could please me code? no matter do, same failure "parse error on input '='"

don't use tabs, indentation significant in haskell, use spaces. following (max takes 2 arguments, maximum takes list).

rgb2cmyk r g b = ((w - (r/255))/w, (w - (g/255))/w, (w - (b/255))/w, 1 - w)       w = maximum [r/255, g/255, b/255] 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -