ScalazFrom Workingmouse WikiScalaz (Scar-lah-zed) is a library written in the Scala Programming Language. One mandate of the library is to depend only on the core Scala API and the core Java 2 Standard Edition API. The intention of Scalaz is to include general functions that are not currently available in the core Scala API. Scalaz is released under a BSD open source licence making it compatible with the licence of the Scala project. Scalaz has been tested using the technique of Automated Specification-Based Testing which originated with a proposal called QuickCheck for the Haskell Programming Language. The original idea of QuickCheck has been ported to the Scala platform as a project called ScalaCheck. Scalaz is currently tested using ScalaCheck version 1.0. Version 2.0 is the first public release of Scalaz (earlier versions were created internally as it evolved). Much of Scalaz evolved as a side-effect of working on commercial client projects or other domain-specific projects that required general libraries, which were unavailable in the core Scala API. The implementation of Scalaz is open to suggestions and patches are welcomed (BSD licence compatible of course). Features Either[A, B] = Left[A] | Right[B] The Either ADT is typically used in preference to the Option ADT for representing early failure of a non-terminating function. In a Java context,
The enhanced Option type is provided using the technique known as Pimp My Library. Additional functions include lifting function application (of various arity) into
Functions that are not specific to any Algebraic Data Type, but are general and useful.
The Scalaz control package is made possible using higher-kinded type polymorphism and includes computational abstractions such as:
This includes functions for integrating core Scala libraries with existing Java core types.
This package was formerly known as Dynamic Scala before integration into Scalaz. It is loosely inspired by a paper written by Simon Peyton-Jones, Simon Marlow, and Conal Elliott (IFL '99) titled, "Stretching the storage manager: weak pointers and stable names in Haskell". It includes usage examples such as:
This library is based on the Links |
