Skip to content

Instantly share code, notes, and snippets.

@maximvl
Created May 14, 2014 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximvl/15ba18db317c23f2ec09 to your computer and use it in GitHub Desktop.
Save maximvl/15ba18db317c23f2ec09 to your computer and use it in GitHub Desktop.
2> redbug:start("lists:nth -> return").
{30,1}
3> lists:nth(5, [a, b, c, d]).
13:29:13 <0.33.0>(dead) {lists,nth,[5,[a,b,c,d]]}
13:29:13 <0.33.0>(dead) {lists,nth,[4,[b,c,d]]}
13:29:13 <0.33.0>(dead) {lists,nth,[3,[c,d]]}
13:29:13 <0.33.0>(dead) {lists,nth,[2,[d]]}
13:29:13 <0.33.0>(dead) {lists,nth,[1,[]]}
13:29:13 <0.33.0>(dead) lists:nth/2 -> {error,function_clause}
13:29:13 <0.33.0>(dead) lists:nth/2 -> {error,function_clause}
13:29:13 <0.33.0>(dead) lists:nth/2 -> {error,function_clause}
13:29:13 <0.33.0>(dead) lists:nth/2 -> {error,function_clause}
13:29:13 <0.33.0>(dead) lists:nth/2 -> {error,function_clause}
redbug done, msg_count - 10
** exception error: no function clause matching lists:nth(1,[]) (lists.erl, line 168)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment