All notable changes to this project will be documented in this file. This change log follows the conventions of keepachangelog.com.
Renamed sequenced
to sequenced-par
to more explicitly state its execution type.
Proper sequenced
function that executes its contents sequentially.
Case in sequenced-par
where a list of tasks would've been transformed to a task of lists of lists
Documentation error.
Given the ambiguity in errors when mixing parallel with non-parallel executions,
failed parallel executions do not contain collections of Throwable
objects anymore,
but rather a single Throwable
object pertaining to the first execution that failed.
Function recover-as
, that resets a failed task to a successful task, containing a user-provided value.
Syntax for recover
and recover-as
in do-tasks
block.
Failures have now been replaced with plain Throwable
objects.
The failure map format of previous versions (containg the message and a vector stack trace)
has been deprecated and removed.
Failed parallel tasks now contain a collection of all Throwable
objects of all the tasks
that failed during execution.
Old representation of failures and errors.
Result
is now hidden and contained within Task
.
Users need not manipulate it anymore.
Its functionality has also been hidden away.
Task
has now been made completely compositional.
Any task execution now returns a new task, that one may continue composing with other tasks.
Public Result
functionality.
fold
in Result
is now a macro to avoid unnecessary function calls
Function from-result
on Task
, which promotes a Result
to a Task
Invariant here is: for some Result
r, (run (from-result r)) == r
get!
for Result
now returns the interval value for both failure and success
get-or-else
function for Task
. This runs the task synchronously and then returns the inner
result value. Equivalent to (halfling.result/get! (halfling.task/run task))
- Tasks and Results are type-checked more accurately
Result
is now adeftype
recover
function added for bothTask
andResult
. This applies a function on a result in case of failure
- Renamed
ap
tomapply
, becauseap
wasn't really the trueap
function, but rather the applicativeapply-n
function.
- Change
fold
forResult
to apply its functions directly on the values of those results and not the results themselves
Task
behaviour to support parallel executionap
,zip
andsequenced
support parallel execution
p-map
, an alternative to clojurespmap
, that uses the library to map a function in parallel
- Library release