## e. y (Raze In)

Returns a Boolean table comparing each box of y (a list of boxed atoms) against each atom in ;y (the Raze of y).

• There is one column for each item in ;y

```   ] y=: 'alpha' ; 'bravo' ; 'charlie'
+-----+-----+-------+
|alpha|bravo|charlie|
+-----+-----+-------+
;y
alphabravocharlie
e.y
1 1 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0
1 0 0 0 1 1 1 1 1 1 0 0 1 1 0 0 0
1 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1```

Analysis: The following expression attaches captions to (e.y) which explain it:

```   2 2 \$ '' ; (,' ',.~;y) ; (>y) ; (e.y)
+-------+----------------------------------+
|       |a l p h a b r a v o c h a r l i e |
+-------+----------------------------------+
|alpha  |1 1 1 1 1 0 0 1 0 0 0 1 1 0 1 0 0 |
|bravo  |1 0 0 0 1 1 1 1 1 1 0 0 1 1 0 0 0 |
|charlie|1 1 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 |
+-------+----------------------------------+```
• 1 at the top-left denotes that the block <'alpha' contains 'a' -- and so forth.

## x e. y (Member (In))

Returns 1 if item x is in list y, otherwise 0.

```   'a' e. 'alpha'    NB. yes, the atom: 'a' is in the literal list
1
'd' e. 'alpha'    NB. no, the atom: 'd' is NOT in 'alpha'
0```

The search term: x can have more than 1 item, in which case (x e. y) returns 0 or 1 for each item in the list x

```   'ad' e. s         NB. test both 'a' and 'd' at once
1 0```

Verb e. can be used to search a boxed list

```   ] y=: 'alpha' ; 'bravo' ; 'charlie'
+-----+-----+-------+
|alpha|bravo|charlie|
+-----+-----+-------+

(<'alpha') e. y   NB. yes, the item (<'alpha') is in the list y
1```

But remember that y contains 'boxed' items, so it can't contain items of another datatype

```   'a' e. y
0
'alpha' e. y
0 0 0 0 0
datatype 'a'
literal
datatype <'alpha'
boxed
datatype y
boxed```

Verb e. can also be used with a matrix y (a list of lists). Then the entire row of y must be matched for 1 to be returned.

• WARNING: anything else will show as 0 without signalling an error, so be sure to get your search term x in the right form!

```   ] t=: >y
alpha
bravo
charlie

'charlie' e. t   NB. t is wide enough for the longest word (...this one)
1
'alpha' e. t     NB. 'alpha' is not an item in t -- it is only part of the target item!
0
'alpha  ' e. t
1```

### Common uses

Useful verbs for use below:

```   all=: *./
any=: +./
if=: 3 : 'if. y do. ''TRUE'' else. ''FALSE'' end.'   NB. utility to test if.-conditions```

1. Test for the presence of certain characters in input strings

```   if -. (' ' e. deb NUM_INPUT)    NB.(is it a single numeral)
if +./ ('\/' e. FILENAME) do.   NB.(does it have a path?)```

2. Use to achieve more robust logic in Boolean conditions

```   if 'left' = 'loft'   NB. does this come as a surprise?
TRUE```

WARNING: if./else./end. only tests the first atom in a Boolean list.

```   'left' = 'loft'
1 0 1 1```

You might use all or any to collapse a (suspected) Boolean list into a single 0/1

```   if all 'left' = 'loft'
FALSE
if any 'left' = 'loft'
TRUE```

Or use e. for a more robust test without pitfalls

```   0 e. ('left' = 'loft')
1```