# lift

```ts
function lift<TArgs extends unknown[], TReturn>(fn: (…args: TArgs) => TReturn): (…args: TArgs) => Operation<TReturn>
```

Convert a simple function into an [Operation](https://frontside.com/effection/api/v4/Operation.md)

### Examples
#### Example 1
```javascript
let log = lift((message) => console.log(message));

export function* run() {
  yield* log("hello world");
  yield* log("done");
}
```
---
### Type Parameters
TArgs extends unknown&lbrack;&rbrack;
the type of the arguments to `fn`


TReturn
return type of `fn`


### Parameters


**fn**: (...**args**:  TArgs) => TReturn


the function to convert into an operation.
### Return Type


(...**args**:  TArgs) => [Operation](https://frontside.com/effection/api/v4/Operation.md)&lt;TReturn&gt;


a function returning an operation that invokes `fn` when evaluated

[View code](https://github.com/thefrontside/effection/tree/effection-v4.2.0/lib/lift.ts#L22)
