truncated list with ellipsis

View: New views
4 Messages — Rating Filter:   Alert me  

truncated list with ellipsis

by russelldb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Total newbie question but not an answer to it so far in the Armstrong  
book (brilliant book btw, haven't enjoyed my computer and programming  
this much for years) or in the documentation that I installed with  
erlang (the erlang reference and the 4 day curse). I tried a google  
search for erlang, beam, ellipsis too.

So...just learning the basics and my kid is in the first year at  
school and so I made a quick function that does the "Number Bonds" of  
N. It works OK but when I run it interactively the list is truncated  
and ellipsis are shown instead. Is there anyway I can have see the  
total list?

An exmplae would be like this:

1> [{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:=  
50].
[{0,50},
  {1,49},
  {2,48},
  {3,47},
  {4,46},
  {5,45},
  {6,44},
  {7,43},
  {8,42},
  {9,41},
  {10,40},
  {11,39},
  {12,38},
  {13,37},
  {14,36},
  {15,35},
  {16,34},
  {17,33},
  {18,32},
  {19,31},
  {20,30},
  {21,29},
  {22,28},
  {23,27},
  {24,26},
  {25,25},
  {26,24},
  {27,...},
  {...}|...]


Using Erlang (BEAM) emulator version 5.6.2 [source] [async-threads:0]  
[kernel-poll:false] installed via MacPorts on OS X 10.4.11.

Cheers

Russell
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: truncated list with ellipsis

by harveyd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1>  X = [{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:=50].
2> io:format("~p~n",[X]).

2008/7/20 Russell Brown <russell.brown@...>:
Hi,
Total newbie question but not an answer to it so far in the Armstrong
book (brilliant book btw, haven't enjoyed my computer and programming
this much for years) or in the documentation that I installed with
erlang (the erlang reference and the 4 day curse). I tried a google
search for erlang, beam, ellipsis too.

So...just learning the basics and my kid is in the first year at
school and so I made a quick function that does the "Number Bonds" of
N. It works OK but when I run it interactively the list is truncated
and ellipsis are shown instead. Is there anyway I can have see the
total list?

An exmplae would be like this:

1> [{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:=
50].
[{0,50},
 {1,49},
 {2,48},
 {3,47},
 {4,46},
 {5,45},
 {6,44},
 {7,43},
 {8,42},
 {9,41},
 {10,40},
 {11,39},
 {12,38},
 {13,37},
 {14,36},
 {15,35},
 {16,34},
 {17,33},
 {18,32},
 {19,31},
 {20,30},
 {21,29},
 {22,28},
 {23,27},
 {24,26},
 {25,25},
 {26,24},
 {27,...},
 {...}|...]


Using Erlang (BEAM) emulator version 5.6.2 [source] [async-threads:0]
[kernel-poll:false] installed via MacPorts on OS X 10.4.11.

Cheers

Russell
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: truncated list with ellipsis

by russelldb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nice one, Thank you.

Found out all about it here http://www.erlang.org/doc/man/io.html

Cheers

Russell
On 20 Jul 2008, at 12:49, Dale Harvey wrote:

1>  X = [{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:=50].
2> io:format("~p~n",[X]).

2008/7/20 Russell Brown <russell.brown@...>:
Hi,
Total newbie question but not an answer to it so far in the Armstrong
book (brilliant book btw, haven't enjoyed my computer and programming
this much for years) or in the documentation that I installed with
erlang (the erlang reference and the 4 day curse). I tried a google
search for erlang, beam, ellipsis too.

So...just learning the basics and my kid is in the first year at
school and so I made a quick function that does the "Number Bonds" of
N. It works OK but when I run it interactively the list is truncated
and ellipsis are shown instead. Is there anyway I can have see the
total list?

An exmplae would be like this:

1> [{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:=
50].
[{0,50},
 {1,49},
 {2,48},
 {3,47},
 {4,46},
 {5,45},
 {6,44},
 {7,43},
 {8,42},
 {9,41},
 {10,40},
 {11,39},
 {12,38},
 {13,37},
 {14,36},
 {15,35},
 {16,34},
 {17,33},
 {18,32},
 {19,31},
 {20,30},
 {21,29},
 {22,28},
 {23,27},
 {24,26},
 {25,25},
 {26,24},
 {27,...},
 {...}|...]


Using Erlang (BEAM) emulator version 5.6.2 [source] [async-threads:0]
[kernel-poll:false] installed via MacPorts on OS X 10.4.11.

Cheers

Russell
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: truncated list with ellipsis

by Adam Kelly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/7/20 Russell Brown <russell.brown@...>:
> 1> [{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:= 50].

The shell function rp is really useful for this, as in:

2> rp([{A,B} || A <- lists:seq(0, 50), B <- lists:seq(0, 50), A + B =:= 50]).

Adam.
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions