Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,12 @@ The Predicate module includes a DSL for building boolean predicates declarativel

```elixir
use Funx.Predicate
alias Funx.Predicate.{GreaterThanOrEqual, IsTrue, In}

check_eligible = pred do
check :age, fn age -> age >= 18 end
check :verified, fn v -> v == true end
any do
check :role, fn r -> r == :admin end
check :role, fn r -> r == :moderator end
end
check :age, {GreaterThanOrEqual, value: 18}
check :verified, IsTrue
check :role, {In, values: [:admin, :moderator]}
end

Enum.filter(users, check_eligible)
Expand All @@ -246,8 +244,8 @@ Features:

- `check` - Project into a field and test with a predicate
- `negate` - Invert a predicate (logical NOT)
- `all` blocks - All predicates must pass (AND logic)
- `any` blocks - At least one must pass (OR logic)
- `all`/`any` blocks - AND/OR logic for complex predicates
- Built-in predicates: `Eq`, `In`, `GreaterThan`, `LessThan`, `MinLength`, `Pattern`, `Required`, `IsTrue`, and more
- Support for optics (Lens, Prism), functions, and behaviour modules

## Validation
Expand Down
2 changes: 1 addition & 1 deletion livebooks/appendable/appendable.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/config/config.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/eq/eq.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/eq/eq_dsl.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/errors/effect_error.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/errors/validation_error.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/filterable/filterable.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/foldable/foldable.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/list/list.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/macros/macros.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/math/math.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/effect/context.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/effect/effect.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/effect/left.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/effect/right.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/either/either.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/either/either_dsl.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/either/left.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/either/right.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/identity/identity.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/maybe/just.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/maybe/maybe.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/maybe/nothing.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/monad.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/reader/reader.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/writer/result.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monad/writer/writer.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/eq_all.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/eq_any.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/list_concat.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/max.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/min.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/monoid.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/ord.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/pred_all.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/pred_any.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/product.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/string_concat.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/sum.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/monoid/utils.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
2 changes: 1 addition & 1 deletion livebooks/optics/iso.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:funx, "0.8.2"}
{:funx, "0.8.3"}
])
```

Expand Down
Loading