Message Turncoat in a DM to get moderator attention

Users Online(? lurkers):
5 posts

what i do when i'm bored, part 4: try and write stuff in languages i have no knowledge of


Posts: 639

so i went to codewars.com and clicked on haskell...

i have to figure out why this doesn't run right:

module Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = do
   return $ a b

 

what i've tried so far:

module Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = return $ a
b

----

module Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = let
   return $ a b

----

module Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = $ a
b

----

I'm getting kind of pissed off.

Posts: 1259
what i do when i'm bored, part 4: try and write stuff in languages i have no knowledge of

I suck at Haskell, but try not using do as I believe that involves monads.

module Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = a * b

Posts: 639
what i do when i'm bored, part 4: try and write stuff in languages i have no knowledge of

module Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = print $ a b

nope

 

odule Multiply.Bug.Fix where

multiply :: Int -> Int -> Int
multiply a b = int $ a
b

nope

 

okay, i'm bored now.

Posts: 639
what i do when i'm bored, part 4: try and write stuff in languages i have no knowledge of

okay, let's try javascript

function multiply(a,b) { a b }

turned to:

function multiply(a,b) { return a b }

and,

function Person(name){
  this.name = name;
}

Person.prototype.greet = function(otherName){
  return "Hi " + otherName + ", my name is " + name;
}

turned to

function Person(name){
  this.name = name;
}

Person.prototype.greet = function(otherName){
  return "Hi " + otherName + ", my name is " + this.name;
}

 

that was easy as ass lol

Posts: 639
what i do when i'm bored, part 4: try and write stuff in languages i have no knowledge of

ooh, i know!!

odule Multiply.Bug.Fix where

multiply :: Int -> Int -> m0 Int
multiply a b = do
   return $ a * b

 

...no.

DENIED

5 posts
This site contains NSFW material. To view and use this site, you must be 18+ years of age.