com.phasmidsoftware.lascala.fp
Created by scalaprof on 11/12/16.
Attributes
Members list
Type members
Classlikes
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
The result of a benchmark: invoking it evaluates the benchmarked expression once more.
The result of a benchmark: invoking it evaluates the benchmarked expression once more.
Type parameters
- T
-
the result type of the benchmarked expression
Attributes
- Companion
- object
- Supertypes
-
trait () => Tclass Objecttrait Matchableclass Any
This case class represents a "closure" on a renderable function (f) and a set of bound parameters (ps).
This case class represents a "closure" on a renderable function (f) and a set of bound parameters (ps).
Type parameters
- R
-
the result type of the closure
- T
-
the parameter type of the closure
Value parameters
- f
-
the (renderable) function
- ps
-
the parameters, each of which may be a value or a Closure
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait () => Try[R]class Objecttrait Matchableclass AnyShow all
This is a collection of general functional-programming-style methods. We could probably get these from ScalaZ but I'd rather have no dependencies.
This is a collection of general functional-programming-style methods. We could probably get these from ScalaZ but I'd rather have no dependencies.
TODO flesh out the unit tests (coverage is low).
TODO replace as an output type with type based on CanBuildFrom
CONSIDER replace Seq with Iterator in signatures
CONSIDER use higher-kinded monad types in order to implement methods for Try and Option at the same time
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FP.type
This is an 2.11-specific appendix to FP
This is an 2.11-specific appendix to FP
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FP_Cross.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
FunctionString.type
Class to represent a (renderable) function string.
Class to represent a (renderable) function string.
Value parameters
- f
-
the name of the function (not necessarily the same as the original definition of the corresponding function/method)
- ps
-
a sequence of Param objects (these represent bound or unbound parameters)
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Type class trait to define something that has a key.
Type class trait to define something that has a key.
CONSIDER try to generalize this so that return value implements Ordering, rather than being any particular type like String.
Created by scalaprof on 11/17/16.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Created by scalaprof on 8/22/16.
Created by scalaprof on 8/22/16.
Attributes
- Supertypes
-
trait () => Tclass Objecttrait Matchableclass Any
This trait defines the concept of a named object, i.e. having a name which is a String.
This trait defines the concept of a named object, i.e. having a name which is a String.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class NamedFunction0[R]
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedFunction.type
NamedFunction class. Could equally be called NamedFunction1
NamedFunction class. Could equally be called NamedFunction1
Type parameters
- R
-
the result type
- T
-
the input type
Value parameters
- f
-
the function itself
- name
-
the name of this function
Attributes
- Companion
- object
- Supertypes
-
trait T => Rclass Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedFunction0.type
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedFunction2.type
NamedFunction3 class.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedFunction3.type
NamedFunction3 class.
NamedFunction3 class.
Type parameters
- R
-
the result type
- T1
-
the input type
- T2
-
the input type
- T3
-
the input type
- T4
-
the input type
Value parameters
- f
-
the function itself
- name
-
the name of this function
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedFunction4.type
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
NamedFunction5.type
NamedFunction3 class.
NamedFunction3 class.
Type parameters
- R
-
the result type
- T1
-
the input type
- T2
-
the input type
- T3
-
the input type
- T4
-
the input type
- T5
-
the input type
Value parameters
- f
-
the function itself
- name
-
the name of this function
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Companion object to RenderableFunction
Companion object to RenderableFunction
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RenderableFunction.type
A representation of a function call. The function (func) which defines the function call is of form Product=>R where the product (tuple)
A representation of a function call. The function (func) which defines the function call is of form Product=>R where the product (tuple)
Created by scalaprof on 1/11/17.
TODO change Seq to List in definition of cbn
Type parameters
- R
-
the ultimate return type of this RenderableFunction (must support ClassTag)
Value parameters
- arity
-
the number of input parameters that are required to fully apply the given function (f)
- cbn
-
a sequence of booleans, corresponding to each of the parameters of (untupled) func. If the boolean is true, then that parameter is call-by-name, i.e. a Function0[T] rather than a T.
- cs
-
a sequence of ClassTags corresponding to the parameters to be passed to f
- f
-
the function itself (this field is not considered in the hashCode and equals methods)
- w
-
a human-readable representation of the function
Attributes
- Companion
- object
- Supertypes
-
trait Producttrait Equalstrait Serializabletrait Product => Try[R]class Objecttrait Matchableclass AnyShow all
RenderableFunctionException
RenderableFunctionException
Value parameters
- s
-
the message
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
FP implementation of a logger.
FP implementation of a logger.
Created by scalaprof on 8/17/16.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SmartLoggerBasic.type
A basic logger.
A basic logger.
Value parameters
- errorFunc
-
the error function
- logFunc
-
the logger function
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SmartLoggerclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
A logger which will log as debug on an Slf4J logger
A logger which will log as debug on an Slf4J logger
Value parameters
- logger
-
an Slf4J logger
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SmartLoggerclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
A logger which will log as info on an Slf4J logger
A logger which will log as info on an Slf4J logger
Value parameters
- logger
-
an Slf4J logger
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SmartLoggerclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SmartLoggerSlf4JInfo.type
This trait and its related object provide a functional-programming style (if somewhat quick-and-dirty) spy feature for logging (or otherwise peeking at) the values of Scala expressions.
This trait and its related object provide a functional-programming style (if somewhat quick-and-dirty) spy feature for logging (or otherwise peeking at) the values of Scala expressions.
While this mechanism (by default) logs values using SLF4J, it does so in a functional style. You do not have to break up your functional expressions to write logging statements (unless they are the recursive calls of a tail-recursive method).
If you just want to slip in a quick invocation of Spy.spy, you will need to provide an implicit spyFunc. The proper simple way to do this is to declare a logger as follows (you can use any name you like since it's an implicit):
implicit val spyLogger: org.slf4j.Logger = Spy.getLogger(getClass)
There's even an (improper) default logger based on the Spy class itself which you can use simply by adding this: import Spy._
In order to use it with an explicitly defined spyFunc, please see the way it's done in SpySpec.
By default, spying is turned on so, if you want to turn it off for a portion of a run, you must set spying to false, then reset it as it was when you return. This is useful for benchmarking or any time you know that there will be just too much information (TMI).
However, there is another mechanism for turning spying off. For example, you have some code which you are continually working on. You don't like to release it with the calls to Spy intact so you remove them. Then you have to go to a significant amount of trouble to put them back. An alternative is to declare the spyLogger to be null (but then you really must include the type annotation as shown above).
Created by scalaprof on 8/17/16.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
This class is based on a mutable Stream. Its purpose is like a one-time-pad: each value is yielded by the Streamer once and once only.
This class is based on a mutable Stream. Its purpose is like a one-time-pad: each value is yielded by the Streamer once and once only.
Type parameters
- X
-
the underlying type and the type of the result
Value parameters
- s
-
the Stream
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait () => Xclass Objecttrait Matchableclass AnyShow all
Type parameters
- T
-
the underlying type of the args
- X
-
one alternative underlying type of Either
- Y
-
the other alternative underlying type of Either
Value parameters
- x2t
-
a conversion function from X to T
- xYes
-
a list of Either[X,Y] objects
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all