Skip to content

Commit 30e55d8

Browse files
author
Alejandro Gómez
authored
Merge pull request #40 from scala-exercises/new-minor-release
Bump new minor release
2 parents 303eff0 + b800d7a commit 30e55d8

39 files changed

+43
-39
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ lazy val stdlib = (project in file("."))
55
organization := "org.scala-exercises",
66
name := "exercises-stdlib",
77
scalaVersion := "2.11.7",
8-
version := "0.1.2",
8+
version := "0.2.1-SNAPSHOT",
99
resolvers ++= Seq(
1010
Resolver.sonatypeRepo("snapshots"),
1111
Resolver.sonatypeRepo("releases")

project/plugins.sbt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.1.1", "0.13", "2.10")
1+
resolvers ++= Seq(
2+
Resolver.sonatypeRepo("snapshots")
3+
)
4+
5+
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.2.1-SNAPSHOT", "0.13", "2.10")
26
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

src/main/scala/stdlib/Asserts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.scalatest._
44

55
/** @param name asserts
66
*/
7-
object Asserts extends FlatSpec with Matchers with exercise.Section {
7+
object Asserts extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
88

99
/** ScalaTest makes three assertions available by default in any style trait. You can use:
1010
*

src/main/scala/stdlib/ByNameParameter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.scalatest._
44

55
/** @param name byname_parameter
66
*/
7-
object ByNameParameter extends FlatSpec with Matchers with exercise.Section {
7+
object ByNameParameter extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
88

99
/** `() => Int` is a Function type that takes a `Unit` type. `Unit` is known as `void` to a Java programmer. The function returns an `Int`. You can place this as a method parameter so that you can you use it as a block, but still it doesn't look quite right.
1010
*/

src/main/scala/stdlib/CaseClasses.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.scalatest._
44

55
/** @param name case_classes
66
*/
7-
object CaseClasses extends FlatSpec with Matchers with exercise.Section {
7+
object CaseClasses extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
88

99
/** Scala supports the notion of ''case classes''. Case classes are regular classes which export their constructor parameters and which provide a recursive decomposition mechanism via pattern matching.
1010
*

src/main/scala/stdlib/Classes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.scalatest._
44

55
/** @param name classes
66
*/
7-
object Classes extends FlatSpec with Matchers with exercise.Section {
7+
object Classes extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
88

99
/** Classes in Scala are static templates that can be instantiated into many objects at runtime.
1010
* Here is a class definition which defines a class Point:

src/main/scala/stdlib/EmptyValues.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name empty_values
66
*
77
*/
8-
object EmptyValues extends FlatSpec with Matchers with exercise.Section {
8+
object EmptyValues extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** ==null==
1111
*

src/main/scala/stdlib/Enumerations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name enumerations
66
*
77
*/
8-
object Enumerations extends FlatSpec with Matchers with exercise.Section {
8+
object Enumerations extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** To create an enumeration, create an object that extends the abstract class `Enumeration`, and set a `val` variable to the method `Value`. This is a trick to give values to each `val`.
1111
*

src/main/scala/stdlib/Extractors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name extractors
66
*
77
*/
8-
object Extractors extends FlatSpec with Matchers with exercise.Section {
8+
object Extractors extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** In Scala, patterns can be defined independently of case classes. To this end, a method named `unapply` is defined to yield a so-called extractor.
1111
*

src/main/scala/stdlib/ForExpressions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name for_expressions
66
*
77
*/
8-
object ForExpressions extends FlatSpec with Matchers with exercise.Section {
8+
object ForExpressions extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** For expressions can nest, with later generators varying more rapidly than earlier ones:
1111
*/

src/main/scala/stdlib/Formatting.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name formatting
66
*
77
*/
8-
object Formatting extends FlatSpec with Matchers with exercise.Section {
8+
object Formatting extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** String can be placed in format:
1111
*/

src/main/scala/stdlib/HigherOrderFunctions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name higher_order_functions
66
*
77
*/
8-
object HigherOrderFunctions extends FlatSpec with Matchers with exercise.Section {
8+
object HigherOrderFunctions extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Meet lambda. Scala provides a relatively lightweight syntax for defining anonymous functions. Anonymous functions in source code are called function literals and at run time, function literals are instantiated into objects called function values.
1111
*

src/main/scala/stdlib/Implicits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.language.implicitConversions
66
/** @param name implicits
77
*
88
*/
9-
object Implicits extends FlatSpec with Matchers with exercise.Section {
9+
object Implicits extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1010

1111
/** The actual arguments that are eligible to be passed to an implicit parameter fall into two categories: * First, eligible are all identifiers x that can be accessed at the point of the method call without a prefix and that denote an implicit definition or an implicit parameter. * Second, eligible are also all members of companion modules of the implicit parameter's type that are labeled implicit.
1212
*

src/main/scala/stdlib/InfixPrefixandPostfixOperators.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.language.postfixOps
66
/** @param name infix_prefix_and_postfix_operators
77
*
88
*/
9-
object InfixPrefixandPostfixOperators extends FlatSpec with Matchers with exercise.Section {
9+
object InfixPrefixandPostfixOperators extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1010

1111
/** Any method which takes a single parameter can be used as an infix operator: `a.m(b)` can be written `a m b`.
1212
*/

src/main/scala/stdlib/InfixTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name infix_types
66
*
77
*/
8-
object InfixTypes extends FlatSpec with Matchers with exercise.Section {
8+
object InfixTypes extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** An infix type `T1 op T2` consists of an infix operator `op` which gets applied to two
1111
* type operands `T1` and `T2`. The type is equivalent to the type application `op[T1,T2]`.

src/main/scala/stdlib/Iterables.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name iterables
66
*
77
*/
8-
object Iterables extends FlatSpec with Matchers with exercise.Section {
8+
object Iterables extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** The next trait from the top in the collections hierarchy is `Iterable`. All methods in this trait are defined in terms of an abstract method, `iterator`, which yields the collection's elements one by one. The `foreach` method from trait `Traversable` is implemented in `Iterable` in terms of `iterator`. Here is the actual implementation:
1111
*

src/main/scala/stdlib/Lists.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name lists
66
*
77
*/
8-
object Lists extends FlatSpec with Matchers with exercise.Section {
8+
object Lists extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Scala Lists are quite similar to arrays which means, all the elements of a list have the same type but there are two important differences. First, lists are immutable, which means elements of a list cannot be changed by assignment. Second, lists represent a linked list whereas arrays are flat. The type of a list that has elements of type `T` is written as `List[T]`.
1111
*

src/main/scala/stdlib/LiteralBooleans.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name literal_booleans
66
*
77
*/
8-
object LiteralBooleans extends FlatSpec with Matchers with exercise.Section {
8+
object LiteralBooleans extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Boolean literals are either true or false, using the true or false keyword
1111
*/

src/main/scala/stdlib/LiteralNumbers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name literal_numbers
66
*
77
*/
8-
object LiteralNumbers extends FlatSpec with Matchers with exercise.Section {
8+
object LiteralNumbers extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Integer Literals are 32-bit and can be created from decimal, hexadecimal:
1111
*/

src/main/scala/stdlib/LiteralStrings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name literal_strings
66
*
77
*/
8-
object LiteralStrings extends FlatSpec with Matchers with exercise.Section {
8+
object LiteralStrings extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Character Literals are quoted with single quotes:
1111
*/

src/main/scala/stdlib/Maps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name maps
66
*
77
*/
8-
object Maps extends FlatSpec with Matchers with exercise.Section {
8+
object Maps extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** A `Map` is an `Iterable` consisting of pairs of keys and values (also named mappings or associations). Scala's Predef class offers an implicit conversion that lets you write `key -> value` as an alternate syntax for the pair `(key, value)`. For instance `Map("x" -> 24, "y" -> 25, "z" -> 26)` means exactly the same as `Map(("x", 24), ("y", 25), ("z", 26))`, but reads better.
1111
*

src/main/scala/stdlib/NamedandDefaultArguments.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.scalatest._
66
/** @param name named_and_default_arguments
77
*
88
*/
9-
object NamedandDefaultArguments extends FlatSpec with Matchers with exercise.Section {
9+
object NamedandDefaultArguments extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1010

1111
/** When calling methods and functions, you can use the name of the variables explicitly in the call, like so:
1212
*

src/main/scala/stdlib/Objects.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name objects
66
*
77
*/
8-
object Objects extends FlatSpec with Matchers with exercise.Section {
8+
object Objects extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** An object is a singleton. One object, that's it. This object is a replacement of static in Java, and is called upon much in the same way.
1111
*/

src/main/scala/stdlib/Options.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.scalatest._
66
/** @param name options
77
*
88
*/
9-
object Options extends FlatSpec with Matchers with exercise.Section {
9+
object Options extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1010

1111
/** If you have worked with Java at all in the past, it is very likely that you have come across a `NullPointerException` at some time (other languages will throw similarly named errors in such a case). Usually this happens because some method returns null when you were not expecting it and thus not dealing with that possibility in your client code. A value of `null` is often abused to represent an absent optional value.
1212
*

src/main/scala/stdlib/ParentClasses.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name parent_classes
66
*
77
*/
8-
object ParentClasses extends FlatSpec with Matchers with exercise.Section {
8+
object ParentClasses extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** In contrast to Java, all values in Scala are objects (including numerical values and functions). Since Scala is class-based, all values are instances of a class.
1111
*

src/main/scala/stdlib/PartialFunctions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name partial_functions
66
*
77
*/
8-
object PartialFunctions extends FlatSpec with Matchers with exercise.Section {
8+
object PartialFunctions extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** A partial function is a `trait` that when implemented can be used as building blocks to determine a solution. The trait `PartialFunction` requires that the method `isDefinedAt` and `apply` be implemented.
1111
*/

src/main/scala/stdlib/PartiallyAppliedFunctions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name partially_applied_functions
66
*
77
*/
8-
object PartiallyAppliedFunctions extends FlatSpec with Matchers with exercise.Section {
8+
object PartiallyAppliedFunctions extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** A partially applied function is a function that you do not apply any or all the arguments, creating another function. This partially applied function doesn't apply any arguments.
1111
*/

src/main/scala/stdlib/PatternMatching.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name pattern_matching
66
*
77
*/
8-
object PatternMatching extends FlatSpec with Matchers with exercise.Section {
8+
object PatternMatching extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Scala has a built-in general pattern matching mechanism. It allows to match on any sort of data with a first-match policy.
1111
* Here is a small example which shows how to match against an integer value:

src/main/scala/stdlib/Ranges.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name ranges
66
*
77
*/
8-
object Ranges extends FlatSpec with Matchers with exercise.Section {
8+
object Ranges extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** A range's upper bound is not inclusive:
1111
*/

src/main/scala/stdlib/RepeatedParameters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.scalatest._
66
/** @param name repeated_parameters
77
*
88
*/
9-
object RepeatedParameters extends FlatSpec with Matchers with exercise.Section {
9+
object RepeatedParameters extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1010

1111
/** A repeated parameter must be the last parameter and this will let you add as many extra parameters as needed.
1212
*

src/main/scala/stdlib/SequencesandArrays.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name sequences_and_arrays
66
*
77
*/
8-
object SequencesandArrays extends FlatSpec with Matchers with exercise.Section {
8+
object SequencesandArrays extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** Scala provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
1111
*

src/main/scala/stdlib/Sets.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name sets
66
*
77
*/
8-
object Sets extends FlatSpec with Matchers with exercise.Section {
8+
object Sets extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** `Set`s are `Iterable`s that contain no duplicate elements. The operations on sets are summarized in the following table for general sets and in the table after that for mutable sets. They fall into the following categories:
1111
*

src/main/scala/stdlib/StdLib.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package stdlib
99
*
1010
* @param name std_lib
1111
*/
12-
object StdLib extends exercise.Library {
12+
object StdLib extends org.scalaexercises.definitions.Library {
1313
override def owner = "scala-exercises"
1414
override def repository = "exercises-stdlib"
1515

src/main/scala/stdlib/Traits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.scalatest._
44

55
/** @param name traits
66
*/
7-
object Traits extends FlatSpec with Matchers with exercise.Section {
7+
object Traits extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
88

99
/** Similar to *interfaces* in Java, traits are used to define object types by specifying the signature of the supported methods. Unlike Java, Scala allows traits to be partially implemented; i.e. it is possible to define default implementations for some methods. In contrast to classes, traits may not have constructor parameters.
1010
*

src/main/scala/stdlib/Traversables.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Stream.cons
77

88
/** @param name traversables
99
*/
10-
object Traversables extends FlatSpec with Matchers with exercise.Section {
10+
object Traversables extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1111

1212
/** At the top of the collection hierarchy is trait *Traversable*. Its only abstract operation is `foreach`:
1313
*

src/main/scala/stdlib/Tuples.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.scalatest._
77
/** @param name tuples
88
*
99
*/
10-
object Tuples extends FlatSpec with Matchers with exercise.Section {
10+
object Tuples extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1111

1212
/** Scala tuple combines a fixed number of items together so that they can be passed around as a whole. They are one indexed. Unlike an array or list, a tuple can hold objects with different types but they are also immutable. Here is an example of a tuple holding an integer, a string, and the console:
1313
*

src/main/scala/stdlib/TypeSignatures.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.scalatest._
44

55
/** @param name type_signatures
66
*/
7-
object TypeSignatures extends FlatSpec with Matchers with exercise.Section {
7+
object TypeSignatures extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
88

99
/** A method's *type signature* comprises its name, the number, order, and types of its parameters, if any, and its result type. The type signature of a class, trait, or singleton object comprises its name, the type signatures of all of its members and constructors, and its declared inheritance and mixin relations.
1010
*

src/main/scala/stdlib/TypeVariance.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55

66
/** @param name type_variance
77
*/
8-
object TypeVariance extends FlatSpec with Matchers with exercise.Section {
8+
object TypeVariance extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** A traditional objection to static typing is that it has much syntactic overhead. Scala alleviates this by providing *type inference*.
1111
*

src/main/scala/stdlib/UniformAccessPrinciple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.scalatest._
55
/** @param name uniform_access_principle
66
*
77
*/
8-
object UniformAccessPrinciple extends FlatSpec with Matchers with exercise.Section {
8+
object UniformAccessPrinciple extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
99

1010
/** The Scala language implements a programming concept known as the [Uniform Access Principle](http://en.wikipedia.org/wiki/Uniform_access_principle) which was first put forth by Bertrand Meyer, inventor of the Eiffel programming language.
1111
*

0 commit comments

Comments
 (0)