Cannot invoke remote function :erlang.length/1 inside match

You cannot run length/1 inside a pattern match. You should move it to a guard:

list when length(list) < 90 -> [list | price]