Erlang syntax error
erlang
Solution
You need to end the function with a period after the last end.
Problem
When I try to compile my erlang script I keep getting this error: ``` (master@WN7-18TL6M1.amer.dell.com)15> c(distribute). distribute.erl:55: syntax error before: distribute.erl:42: function get_completed/3 undefined error ``` Here is my source: ``` get_completed(Current, Index, Count) -> if length(Current) >= Index -> {Count, length(Current)}; true -> if lists:nth(Index, Current) == 'timeout' -> get_completed(Current, Index+1, Count); true -> get_completed(Current, Index+1, Count+1) end end ``` Line 55 is the last `end`