[erlang-questions] [erlang-bugs] erlang:delete_element/2 missing

Matthew Evans mattevans123@REDACTED
Thu Feb 7 17:29:15 CET 2013


Ugh...thanks Steve,

I'm not sure I want to move to R16A yet. 

I guess I'll do something like this.

4> Tupple = {one,two,three}.
5> lists:foldl(fun(C,Acc) when C/=2 -> erlang:append_element(Acc,erlang:element(C,Tupple)); (_,Acc) -> Acc end,{},[1,2,3]).
{one,three}

________________________________
> Date: Thu, 7 Feb 2013 11:14:15 -0500 
> Subject: Re: [erlang-bugs] erlang:delete_element/2 missing 
> From: vinoski@REDACTED 
> To: mattevans123@REDACTED 
> CC: erlang-questions@REDACTED; erlang-bugs@REDACTED 
> 
> 
> 
> On Thu, Feb 7, 2013 at 11:04 AM, Matthew Evans 
> <mattevans123@REDACTED<mailto:mattevans123@REDACTED>> wrote: 
> 
> Hi, 
> 
> It's in the Erlang documentation. Has this been removed (tried on 
> R15B01 and R15B03)? 
> 
> 
> 
> Erlang R15B01 (erts-5.9.1) [source] [smp:8:8] [async-threads:0] [hipe] 
> [kernel-poll:false] 
> 
> Eshell V5.9.1 (abort with ^G) 
> 1> erlang:delete_element(2, {one, two, three}). 
> ** exception error: undefined function erlang:delete_element/2 
> 2> 
> 
> That's a new bif for R16: 
> 
> Erlang R16A (erts-5.10) [source] [64-bit] [smp:8:8] [async-threads:10] 
> [kernel-poll:false] 
> 
> Eshell V5.10 (abort with ^G) 
> 1> erlang:delete_element(2, {one, two, three}). 
> {one,three} 
> 2> 
> 
> --steve 
 		 	   		  


More information about the erlang-questions mailing list