കാണിക്കല്‍ മാത്രം.
0:03
S… Speaker 1 (14- Combining Predicates)
So we talked about composing functions to build more complex and interesting
0:08
S… Speaker 1 (14- Combining Predicates)
functions We can also combine predicates to build more complex
0:12
S… Speaker 1 (14- Combining Predicates)
predicates.
0:12
S… Speaker 1 (14- Combining Predicates)
Let me show you so I'm going to declare two predicates a
0:16
S… Speaker 1 (14- Combining Predicates)
predicate of a string called has left brace so
0:21
S… Speaker 1 (14- Combining Predicates)
str goes to str
0:25
S… Speaker 1 (14- Combining Predicates)
that starts with a left brace That's a
0:30
S… Speaker 1 (14- Combining Predicates)
small reusable predicate
0:33
S… Speaker 1 (14- Combining Predicates)
call the second predicate has right brace and
0:37
S… Speaker 1 (14- Combining Predicates)
here we call the ends with method and pass
0:41
S… Speaker 1 (14- Combining Predicates)
a right brace Now we can combine this predicates.
0:45
S… Speaker 1 (14- Combining Predicates)
Let me show you.
0:45
S… Speaker 1 (14- Combining Predicates)
So if you type has left brace dot look we
0:49
S… Speaker 1 (14- Combining Predicates)
have and negate and or these are
0:53
S… Speaker 1 (14- Combining Predicates)
equivalent to The logical and the logical or and
0:58
S… Speaker 1 (14- Combining Predicates)
the not operator in Java.
0:59
S… Speaker 1 (14- Combining Predicates)
So let's say has left brace
1:04
S… Speaker 1 (14- Combining Predicates)
And here we should pass a second predicate.
1:07
S… Speaker 1 (14- Combining Predicates)
So we pass has right brace.
1:10
S… Speaker 1 (14- Combining Predicates)
Now this returns a new predicate.
1:12
S… Speaker 1 (14- Combining Predicates)
We can store it over here and call it has
1:17
S… Speaker 1 (14- Combining Predicates)
left and right braces.
1:18
S… Speaker 1 (14- Combining Predicates)
And then just like any
1:22
S… Speaker 1 (14- Combining Predicates)
other predicates,
1:23
S… Speaker 1 (14- Combining Predicates)
we can use that to test an object.
1:27
S… Speaker 1 (14- Combining Predicates)
So we call a test method and pass a string like this.
1:31
S… Speaker 1 (14- Combining Predicates)
Key colon value.
1:33
S… Speaker 1 (14- Combining Predicates)
this returns the result.
1:35
S… Speaker 1 (14- Combining Predicates)
In this case the result is true because this string has both the left
1:39
S… Speaker 1 (14- Combining Predicates)
and right braces.
1:40
S… Speaker 1 (14- Combining Predicates)
Now we can also combine two predicates using a
1:44
S… Speaker 1 (14- Combining Predicates)
logical OR.
1:44
S… Speaker 1 (14- Combining Predicates)
So in this case we get a new predicate and this
1:48
S… Speaker 1 (14- Combining Predicates)
returns true if our input string has either the left or the right brace.
1:53
S… Speaker 2 (14- Combining Predicates)
Now,
1:54
S… Speaker 1 (14- Combining Predicates)
what about the negate method?
1:56
S… Speaker 1 (14- Combining Predicates)
That is pretty straightforward.
1:57
S… Speaker 1 (14- Combining Predicates)
So we call the negate method and this returns a new predicate
2:02
S… Speaker 1 (14- Combining Predicates)
that does the opposite of
2:04
S… Speaker 1 (14- Combining Predicates)
the first predicate.
2:05
S… Speaker 1 (14- Combining Predicates)
So this is how we can combine predicates.

ഈ അക്ഷം AI (സ്വയമുണ്ടായി അക്ഷരാനുഗ്രഹം) ഉണ്ടാക്കിയത്. പിശകുകള്‍ ഉള്‍ക്കൊള്ളാം. അല്ലെങ്കില്‍ മൂല ഓഡിയോ ഉപയോഗിക്കുന്നതിനു് മുന്‍കൂട്ടിയുള്ള പിശകുകള്‍ സ്ഥിതീകരിക്കാം. ഐഐ നയം

❤️ സ്നേഹം STT.ai? കൂട്ടുകാരോട് പറയൂ!
സാരാംശം
ഈ അക്ഷരമാലയുടെ AI സമ്മറി ഉണ്ടാക്കാന്‍ കെസ്റ്റെല്‍ ക്ലിക്ക് ചെയ്യുക.
സഖാവ്...
ഈ ട്രാന്‍സ്പെക്റ്റിനെ കുറിച്ച് AI ചോദിയ്ക്കുക
ഈ പുസ്‌തകത്തെക്കുറിച്ച് എന്തെങ്കിലും ചോദിക്കുക — AI - ന്‌ ആവശ്യമായ ഭാഗങ്ങൾ കണ്ടെത്തുകയും ഉത്തരം നൽകുകയും ചെയ്യും.