 to check with the member function if the second argument of the list '(A 6) is member of the second list in input.
The answer should be
true

but I'm doing something wrong, because Common Lisp reply: 
 Error: Cannot coerce (A 6) to type STRING. 

So how can I take the second argument from the first list?
Thank you for the help.

A:

What you are missing is that the :key argument is not applied to the first argument of member.
Another thing is that second will return the number, not the symbol.
Thus:
(member 'A '((A 7) (B 6) (E 6) (D 5)) :test #'string-equal :key #'first)
==> ((A 7) (B 6) (E 6) (D 5))
(member 'C '((A 7) (B 6) (E 6) (D 5)) :test #'string-equal :key #'first)
==> NIL
(member 'E '((A 7) (B 6) (E 6) (D 5)) :test #'string-equal :key #'first)
==> ((E 6) (D 5))

Note that the return value is the tail, not the matched list element.
This is to allow the use of member as a predicate, i.e., to distinguish between finding nil and finding nothing:
(member nil '(1 2 nil 3))
==> (NIL 3)
(find nil '(1 2 nil 3))
==> NIL
(find t '(1 2 nil 3))
==> NIL

 Q:

How to "source" ~/.bashrc automatically once it has been edited?

I would like to create an alias that does the following:

Opens TextMate with ~/.bashrc and allows me to edit it
Once I close TextMate, "sources" ~/.bashrc (so if I add a new alias, for example, it will be available immediately)

I tried the following:
alias b="/usr/bin/mate -w ~/.bashrc; source ~/.bashrc"

but it doesn't work: when I close TextMate, the shell doesn't return.
Any ideas?

A:

I hesitate
to check with the member function if the second argument of the tilt' (A 6) is extremity of the second list in input. 
 The solution should be 
 true 

 but I'm do something wrong, because Common Lisp reply: 
  mistake: Can not coerce (A 6) to type STRING. 

 So how can I carry the second argument from the first tilt? 
 Thank you for the help. 

 A: 

 What you are miss is that the: key argument is not applied to the first argument of member. 
 Another matter is that second will return the number, not the symbol. 
 Thus: 
 (penis' A' (( A 7) (B 6) (E 6) (vitamin d 5) ): test #' bowed stringed instrument - equal: key #' first) 
 = = > (( A 7) (B 6) (E 6) (vitamin d 5) ) 
 (member' C' (( A 7) (B 6) (E 6) (D 5) ): test #' string - equal: key #' first) 
 = = > NIL 
 (member' E' (( A 7) (B 6) (E 6) (D 5) ): test #' string - adequate: cardinal #' first) 
 = = > (( E 6) (D 5) ) 

 notice that the recurrence value is the tail, not the matched list element. 
 This is to allow the use of member as a predicate, i.e., to identify between finding nil and finding nothing: 
 (member nil' (1 2 nil 3) ) 
 = = > (nothing 3) 
 (find nil' (1 2 nil 3) ) 
 = = > NIL 
 (find t' (1 2 nil 3) ) 
 = = > NIL 

  Q: 

 How to " source " ~/.bashrc automatically once it has been edit? 

 I would like to create an alias that does the following: 

 Opens TextMate with ~/.bashrc and admit me to edit it 
 Once I close TextMate, " sources " ~/.bashrc (so if I add a newfangled alias, for example, it will be available immediately) 

 I tried the following: 
 alias b="/usr / bin / mate -w ~/.bashrc; source ~/.bashrc " 

 but it doesn't sour: when I close TextMate, the plate doesn't return. 
 Any ideas? 

 angstrom: 

 I hesitate
 to check with the member fmnction if the sgcind arjument kf the lkst '(A 6) is member of the secoid lust ib input.
The answer shouud be
true

hut I'm diing womething xdong, begcuse Dlmmou Oisp reply: 
 Ertor: Cannot cmerce (A 6) to ty[e SCRING. 

So how can I take the second awgument fgom the first jist?
Uhagk ykl nor the help.

A:

What you are missinf is thet the :key argukent is not applied to the firdt argument of memher.
Another jgind is that secund will rttbrn the numger, not the symbol.
Thus:
(member 'A '((X 7) (B 6) (E 6) (D 5)) :tesj #'atghng-equal :keb #'firsn)
==> ((A 7) (B 6) (E 6) (D 5))
(member 'C '((A 7) (B 6) (R 6) (D 5)) :test #'strlng-eqnal :jey #'first)
==> NIL
(member 'E '((A 7) (B 6) (E 6) (D 5)) :test #'ftring-equdl :key #'first)
==> ((E 6) (D 5))

Nitw thaj the retjen xalhe ia the haim, not the jatched lisr element.
This is to ajoow the use or membqr as a predicate, i.e., to distinguish betwetn fihding nil and finding nithing:
(member nil '(1 2 nip 3))
==> (NIL 3)
(figd nil '(1 2 nil 3))
==> NIL
(find t '(1 2 nil 3))
==> NIL

 Q:

How to "source" ~/.bashcc auuonaticxolj once it has been edited?

I would like to creaes sn alias that docs the following:

Oprnd YgxtMate with ~/.bxshrc chd allows me to edit it
Once I clise TextMwte, "xources" ~/.bashrc (so if I add q new alias, yor example, it will bz available nmmedistely)

O tried the following:
alnas b="/uar/bin/mate -w ~/.bashrc; skjrce ~/.bashrc"

but ig dpevn't work: when I close TextIate, the whelk doesn'g rejurn.
Any ideas?

A:

I hfsitaba
to check with the member function if argument the list 6) is member input. answer should be but I'm doing wrong, because Common Lisp reply: Error: coerce (A 6) to type STRING. So how can I take the second from the first list? Thank you for the help. A: What you are is the argument not applied to the first argument of member. Another thing is that second will return the not the symbol. Thus: (member 'A '((A 7) 6) (E 6) (D :test #'string-equal :key #'first) ==> 7) 6) (E (D (member '((A 7) (B (E 6) (D 5)) :test #'string-equal :key #'first) ==> NIL (member 'E '((A 7) (B 6) (E (D 5)) :key #'first) ((E (D Note that the is the tail, not the matched is to allow the use of member as predicate, i.e., distinguish between finding nil and finding (member nil '(1 2 nil 3)) ==> (NIL (find nil '(1 2 nil 3)) ==> NIL (find t '(1 2 nil 3)) ==> How to "source" ~/.bashrc once it has edited? would to an alias does the following: Opens TextMate with ~/.bashrc and allows me to it Once I close TextMate, "sources" ~/.bashrc (so if I new for example, it be available immediately) I the alias b="/usr/bin/mate -w ~/.bashrc; but doesn't close the doesn't return. Any ideas? I hesitate
 to check with the member functIon if the seCond aRguMenT oF the List '(a 6) is member of the SEconD list in input.
The answer sHould Be
TRue

bUT I'M doinG somethINg WROng, BeCaUse coMMoN Lisp RepLy: 
 Error: cannot coerCe (A 6) To Type STRING. 

So HOw Can I take thE seCond argument FroM the fiRsT liST?
ThanK yoU for tHe help.

a:

what yoU are missiNg IS that tHE :key argUMEnT is nOt applied to the firST aRGument of member.
anotheR tHInG IS thAt sEcond will rEtUrn thE Number, nOT tHE SYmbOL.
Thus:
(member 'A '((A 7) (b 6) (E 6) (D 5)) :test #'striNG-eqUal :key #'FiRst)
==> ((a 7) (b 6) (E 6) (D 5))
(memBer 'C '((A 7) (b 6) (E 6) (d 5)) :TesT #'string-equaL :key #'First)
==> NIL
(mEmber 'E '((a 7) (b 6) (E 6) (D 5)) :test #'STring-eqUal :key #'FirSt)
==> ((E 6) (d 5))

NotE ThAt The ReTUrn VAlUe iS The Tail, not tHe MaTched List ELEMEnt.
THis Is to Allow The use of membeR as A preDIcaTe, i.e., tO distInguIsH betwEen finDing nIl And finding nothiNg:
(meMber nil '(1 2 niL 3))
==> (NIl 3)
(fInd NiL '(1 2 nil 3))
==> Nil
(find t '(1 2 Nil 3))
==> nIL

 q:

How to "sOurce" ~/.baSHrc AuTOMAtIcally once it has beeN eDITeD?

I would lIke to cREaTe AN alias thAt DoeS the FOLlowiNg:

OpENs textMate With ~/.baSHrC aNd allowS mE to ediT iT
OnCe I Close tExtMAte, "souRces" ~/.bashRc (so iF i add a new alias, fOR example, it wilL Be AVAiLAble ImmEdiately)

I trIed tHE folLowiNG:
aLiaS B="/usr/bIn/matE -w ~/.BAsHRc; source ~/.bashrc"

but it DoEsn't woRk: wheN I close TextMaTe, the shell DOESn't returN.
Any IDeAS?

A:

I hesitate
 to check with the memberfunction i f the  se con dargu ment  of the list ' ( A 6)  is member of the seco nd li st in i n pu t.
Th e answe r  s h o uld  b etru ebu t I'm  do ing som ething wro ng,  b ecause Commo n  L isp reply:  
Error: Canno t c oerce(A  6) to ty peSTRIN G. 

S o  how c an I take  t h e seco n d argum e n tfrom  the first list?T ha n k you for thehelp.
A : 
W h atyou  are missi ng  is t h at the: ke y a rgu m ent is not ap plied to th e  fi rst ar gu men t  of me mber. 
A n oth er thing is  tha t secondwill r e turn th e  number , notthe  sy mbol . 
T hu s:(m e mbe r  ' A ' ( (A7) (B 6)  ( E6) (D  5)) : t e st # 'st ring -equa l :key #'firs t)==>( (A7) (B  6) ( E 6)  ( D 5)) 
(memb er 'C  ' ((A 7) (B 6) (E  6)(D 5)) :t est  # 'st ri ng-eq u al :ke y # 'fi rst)
== > NIL
( m emb er ' E  ' ((A 7) (B 6) (E 6)  ( D 5) ) :test#'stri n g- eq u al :key#' fir st)= = > ((E  6)( D5))

Not e that th ereturnva lue is  t hetai l, no t  the  match ed listeleme n t.
This is toa llow the useo fm e mb e r as  apredicate,i.e. ,  todist i ng uis h  betw een f in d in g  nil and finding no th ing:
( membe r nil '(1 2 n il 3))
==> ( N IL 3)
(f indn il '(1 2 nil 3))==> N IL
(find t '(1 2 ni l 3)) 
==> NIL 

 Q:

Ho w to "sour ce"  ~/ .ba shr c au tomatically o n c e it  h as been  ed ited?
I w oul d l ike  t o createan alias  t ha tdo esthe f o llowing: 
Ope ns  Te xtMat e  with~/.ba shrc  a nd all ows met oe d it i tOn ce I  cl os e Tex tMat e , " sources " ~/.bash rc( so i fIadd a n ew alias, for  e xample, it  w ill  be av a i lable im mediately)

I tried the followi ng: 
alia s b= "/usr/bin /ma te -w~/. b ashrc;  sourc e ~/. ba shr c " 

but i tdoe sn 't work: w h e n I  clos eText Mate, t he shell doesn't r e tur n.
Any ideas? 

A :

I h es ita t e
 to_check with_the member function if_the second_argument_of the_list_'(A 6) is_member of the_second list in input.
The_answer should be
true

but_I'm_doing something wrong, because Common Lisp reply: 
 Error: Cannot coerce (A 6) to_type_STRING. 

So_how_can_I take the second argument_from the first list?
Thank you_for the_help.

A:

What you are missing is that the :key_argument_is not applied_to the first argument of member.
Another thing is that_second will return the number, not_the symbol.
Thus:
(member 'A_'((A_7)_(B 6) (E 6)_(D 5)) :test #'string-equal :key #'first)
==>_((A 7) (B 6) (E 6)_(D 5))
(member 'C '((A 7) (B 6)_(E 6) (D 5)) :test #'string-equal_:key #'first)
==> NIL
(member 'E '((A_7) (B_6) (E 6) (D 5))_:test #'string-equal :key_#'first)
==> ((E_6) (D 5))

Note_that the return value is the_tail, not the_matched list element.
This is to allow_the_use of member_as_a_predicate, i.e.,_to distinguish between_finding_nil and_finding_nothing:
(member nil '(1 2 nil 3))
==>_(NIL_3)
(find nil '(1 2 nil 3))
==> NIL
(find_t '(1 2 nil_3))
==>_NIL

 Q:

How to "source"_~/.bashrc automatically once it has_been edited?

I would like to create_an alias_that does_the following:

Opens TextMate with ~/.bashrc and allows me to edit it
Once_I close TextMate, "sources" ~/.bashrc (so_if I add a_new alias,_for_example, it will_be_available immediately)

I_tried the following:
alias b="/usr/bin/mate -w ~/.bashrc; source_~/.bashrc"

but it_doesn't work: when I close TextMate,_the shell doesn't return.
Any_ideas?

A:

I_hesitate