Skip to content
Snippets Groups Projects
Commit 8ba8198f authored by Augustin Jaujay's avatar Augustin Jaujay Committed by ROUSSET Noemie
Browse files

Optimisation avec pattern matching

parent 5402f04e
Branches
Tags
No related merge requests found
......@@ -446,8 +446,7 @@ defmodule Index.Augmentation do
##BR_G70
def certificationToNonLeaver(local_cindex) do
:ets.match(local_cindex, {:_, :"$1"})
|> Enum.map(fn [x] -> x end)
|> Enum.reduce(true, fn entry, acc ->
|> Enum.reduce(true, fn [entry], acc ->
if entry[:toLeaver] != nil do
(entry[:toLeaver] == false) && acc
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment