|
Scala example source code file (IdSyntaxTest.scala)
The IdSyntaxTest.scala Scala example source codepackage scalaz import std.AllInstances._ object IdSyntaxTest extends SpecLite { "smorgasbord" in { import syntax.id._ 2 |> (_ * 3) must_===(6) 1.squared must_===((1, 1)) "foo" matchOrZero { case "bar" => 1 } must_===(0) 0.doWhile(_ + 1, _ < 3) must_===(3) 0.doWhile(_ + 1, _ => false) must_===(1) 0.whileDo(_ + 1, _ < 3) must_===(3) 0.whileDo(_ + 1, _ => false) must_===(0) } } Other Scala examples (source code examples)Here is a short list of links related to this Scala IdSyntaxTest.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.