the code that fails is below. Here's some imported code:
newtype Size = Size Int
deriving (Eq, Ord, Show, Num)
getSize :: Size -> Int
getSize (Size i) = i
the code that fails is below. Here's some imported code:
newtype Size = Size Int
deriving (Eq, Ord, Show, Num)
getSize :: Size -> Int
getSize (Size i) = i
require 'sinatra' | |
require 'active_record' | |
require 'sqlite3' | |
require 'json' | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'sqlite3', | |
:database => 'app.db' | |
) |
Dear mother, | |
If you read this letter then I have unfortunately died. Don't believe everything you read about me, | |
as I'm sure not all of it is true. You knew it already; I love guns. This love is what killed me. | |
I dared venture out into the unknown and I guess I didn't make it back. | |
Ever since the day my brother was killed by a better fighter, I vowed to avenge his death. Weapons | |
are the best way to outmatch an opponent. They are the great equalizer. A Wookie can fall to a pistol | |
blast. My brother could've been saved had he carried a weapon. Fists and claws are nothing. All that | |
matters is the concentration of energy that is expelled from the tip of a riffle. I have spent my |
import scalaz._ | |
import Scalaz._ | |
class InvoiceValidations { | |
def checkName(name: String): ValidationNel[String, String] = { | |
if (name.length > 100) | |
"name too long".failNel[String] | |
else | |
name.successNel[String] | |
} |