Resource models resource allocation and releasing. It is specially useful when multiple resources that depend on each other need to be acquired and later released in reverse order. Whn a resource is created, one can make use of the
use method to run a computation with the resource. The finalizers are guaranteed to run afterwards in reverse order of acquisition.
public static func fix(_ value: ResourceOf<F, A>) -> Resource<F, A>
Value in higher kinded form.
Value casted to Resource.
Initializes a resource.
Function to acquire the resource.
Function to release the resource.
A Resource that will run the provided functions to acquire and release it.
public func combine(_ other: Resource<F, A>) -> Resource<F, A>