/* * Copyright (C) 2007-2019 Artima, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Automatically generated Scala interpreter transcript from: * * Programming in Scala (Fourth Edition) * by Martin Odersky, Lex Spoon, Bill Venners * * http://booksites.artima.com/programming_in_scala_4ed */ scala> trait Increaser { scala> def increaseOne(increaser: Increaser): Int = scala> increaseOne( scala> increaseOne(i => i + 7) // Scala 2.12 ^ error: not found: value increaseOne scala> val stream = Arrays.stream(Array(1, 2, 3)) ^ error: not found: value Arrays scala> stream.map(i => i + 1).toArray // Scala 2.12 ^ error: not found: value stream scala> val f = (i: Int) => i + 1 f: Int => Int = $$Lambda$755/1346560976@412c5e8b scala> val stream = Arrays.stream(Array(1, 2, 3)) ^ error: not found: value Arrays scala> stream.map(f).toArray ^ error: not found: value stream scala> stream.map(i => f(i)).toArray ^ error: not found: value stream scala> val f: IntUnaryOperator = i => i + 1 ^ error: not found: type IntUnaryOperator scala> val stream = Arrays.stream(Array(1, 2, 3)) ^ error: not found: value Arrays scala> stream.map(f).toArray ^ error: not found: value stream