Тёмный

Curried Functions - Computerphile 

Computerphile
Подписаться 2,4 млн
Просмотров 101 тыс.
50% 1

It's all about the input. You can't always give all a function's inputs at the same time. Professor Graham Hutton explains about curried functions.
/ computerphile
/ computer_phile
This video was filmed by Graham Hutton and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Опубликовано:

 

31 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 295   
@jonathandannel8712
@jonathandannel8712 3 года назад
"Well, maybe on a Saturday night, when you've been out, you try and put all 3 inputs in at the same time.." Graham is so funny without even trying to be. His explanations are always on point, too. Great video.
@kevinbee4617
@kevinbee4617 4 года назад
The fact that functions in Haskell are curried by default explains the function signatures with multiple arrows. "add x y = x+y" has the type *"Integer -> Integer -> Integer"* A function that takes and Int and produces another function that takes another Int and produces an Int "add (x y) = x + y" has the type "(Integer, Integer) -> Integer" - Like you would expect in Java "int add(int x, int y) {return x + y;}". By the way, that notation is a fancy way to write "add pair = (first pair) + (second pair)". It really only has *one* parameter "pair".
@alpergunes6380
@alpergunes6380 3 года назад
So the truth what is underlying here "functions are exactly take only one argument". When you call a function with two arguments, you are actually calling a function with one "pair".
@kevinbee4617
@kevinbee4617 3 года назад
@@alpergunes6380 In Haskell you could create a multi-argument function, by passing it a list or a tuple. That's what I have done in the "Java" example. In actual Java, you can have multiple parameters. Typically in Haskell, you wouldn't use tuples or pairs though, but currying, which is different. In currying you pass the first argument to a function with one argument, which then returns another function and then you pass the second argument to that new function to get the end result. x = add 4 5 is the same as x = (add(4))(5) t = add(4) -- t is a "4 adder" x = t(5) -- putting 5 in a 4-adder gives 9
@RonInbar
@RonInbar 2 года назад
It's not `add (x y)`, it's `add (x, y)`. The comma is important. Without it, `add (x y)` means `(add . x) y`. I.e. apply x to y, then apply `add` to the result.
@thoperSought
@thoperSought 2 года назад
0:10 _"... which sound a bit spicy, but are actually very useful."_ excellent delivery, Professor Hutton.
@letMeSayThatInIrish
@letMeSayThatInIrish 4 года назад
I will call them "Schönfinkeled functions' from now on.
@PaulBunkey
@PaulBunkey 4 года назад
8:57 *Looks at perfectly understandable expression* "Let's make it clear what's going on", *writes Haskel notation gibberish*
@rogerbosman2126
@rogerbosman2126 4 года назад
The point of the notation is to make it explicit that a curried function is a function taking a single argument and then returns a function. By including the explicit lambda notation it ismuch more clear that what is returned is actually a function that takes the next argument. The notation is not difficult. foo x = x is the same as foo = \x -> x
@lawrencedoliveiro9104
@lawrencedoliveiro9104 4 года назад
There is failyr standard lambda-calculus notation, e.g. f = λx.x But I agree, that Haskell notation doesn’t make any sense to someone who doesn’t know Haskell.
@jeromesnail
@jeromesnail 4 года назад
@@lawrencedoliveiro9104 it does make perfect sense for those who know about maths though. It's like arrow functions in JavaScript, the notation make it very clear that the function is something that given an argument x, returns something that depends on x.
@rikwisselink-bijker
@rikwisselink-bijker 4 года назад
I think this is actually the first video with him that wasn't totally pointless and boring for people who don't know Haskell (nor have any interest in learning it)
@Jopie65
@Jopie65 4 года назад
I miss an (I think) intuitive example I use often to demonstrate currying. Something like: add x y = x + y addFour = add 4 addFour 5 9 addFour 6 10
@StephenCrespo
@StephenCrespo 4 года назад
This makes more sense than the entire video
@aymanayman9000
@aymanayman9000 4 года назад
I know but to think about curried functions I think you need to think in terms of assembly line where you can change what line does by changing a part of it it's not the only way maybe you can use callback but you must consider also that this is a mathematical way of thinking maybe those are wrong reasons or maybe there are other reasons I'm not sure but that's how I think about it
@WoLpH
@WoLpH 4 года назад
When he was starting to explain the curry with the add function I was really expecting this example. The map example wasn't wrong but much more complicated than it needed to be.
@zecosta9579
@zecosta9579 4 года назад
This example would have been the perfect ending to the video, thank you for posting it :)
@user255
@user255 4 года назад
I think your example is better, than what the video gave, but I still don't see any use for this feature. The normal way is more clear and practically equally long: add(x, y) = x + y addFour(x) = add(x, 4)
@richardjames712
@richardjames712 4 года назад
First time I've actually understood currying - or at least, I'm starting to understand it now. Many thanks.
@Pacvalham
@Pacvalham 4 года назад
This is probably the simplest explanation of currying: Regular functions take all of the inputs at once. Curried functions take one input and return another function that takes the next input (or the result if it's the last input).
@papikabron18
@papikabron18 4 года назад
This makes javascripting easier
@omgomgomgd
@omgomgomgd 4 года назад
that's a funny topic to pick on april first, there are people who won't think this is a real thing.
@deltav9784
@deltav9784 4 года назад
That's why i'm watching this video lol
@matsonnerby
@matsonnerby 4 года назад
Exactly. I was hoping for a 1 April joke. Noop
@superscatboy
@superscatboy 4 года назад
There's no way Haskell can be a real thing.
@3dlabs99
@3dlabs99 4 года назад
Yeah this april 1st joke is BOOORING
@IIARROWS
@IIARROWS 4 года назад
I never knew about curried functions. At the beginning I was sceptic about being an April Fools video. The conviction grew, then I realized it made sense.
@Gamesaucer
@Gamesaucer 4 года назад
It does sound like it could be a joke, especially with the thumbnail. Still, it's actually pretty useful to realise currying/partial application is a thing. Wish they'd delayed it a bit because I bet some people skipped the video thinking it's a joke.
@jorgejarai
@jorgejarai 4 года назад
I demand the new world currency must be the Brailsford (with the generic currency ¤ as its symbol)
@QuantumFluxable
@QuantumFluxable 3 года назад
that's no generic currency, it's dwarf bucks!
@Twisted_Code
@Twisted_Code 3 года назад
okay I must be missing context here. Care to explain?
@QuantumFluxable
@QuantumFluxable 3 года назад
@@Twisted_Code that's the symbol used for currency in the video game dwarf fortress, the community calls it dwarf or dorf bucks :)
@jorgejarai
@jorgejarai 3 года назад
@@Twisted_Code Of course. The ¤ symbol is used when you're talking about an unspecified currency (not euros or dollars, but a hypothetical unit). I think it'd look neat in a real world situation
@Twisted_Code
@Twisted_Code 3 года назад
I'm still not following how this all relates to the video? Are you referring to the cash machine part of the video?
@agivney
@agivney 4 года назад
Great explanation. I like how you explain how to apply this to the map function, this makes the concept clear.
@skyburngames7381
@skyburngames7381 3 года назад
Very clear explanation of curried functions, higher-order functions, and lambda expressions, worth the 10 min watch!
@Marc-tm4xh
@Marc-tm4xh 4 года назад
I feel like he skipped over a pretty big reason you would even want to use currying, which is being able to "pre-compute" (there's got to be actual terminology for this) part of your function, potentially saving you a lot of computation over multiple iterations. Similar to memoization, except that in this case the function itself is acting as your "cache". Or am I completely wrong here?
@michaela244
@michaela244 4 года назад
I've used this with spline interpolation once. Interpolation involves solving a system of linear equations, a fairly expensive process, but once it's done you can use the results to compute the interpolated value in any number of points. So using currying felt like an obvious choice. I've done the same assignment also in C, and it sure felt nice to be able to say at the end of the process: now I have a function from reals to reals, don't worry about the details.
@MPnoir
@MPnoir 4 года назад
You mean partial evaluation?
@monnef
@monnef 4 года назад
It can be seen as a memoization of its partially applied arguments. In the case of Haskell, it really doesn't matter, because it's a pure functional language so values get memoized automagically (e.g. when `factorial 100` is called first time, it gets computed, but if `factorial 100` is needed again, anywhere, result is just loaded from memory and it won't be computed again).
@yogiturtleseraph8208
@yogiturtleseraph8208 4 года назад
When I heard of it the first time, the problem to solve was: how to have multiple parameters functions in a language that just allow single parameter functions (aka lambda calculus). That is pretty big.
@luismiguel.b
@luismiguel.b 4 года назад
It is called partial application function
@myguitardidyermom212
@myguitardidyermom212 2 года назад
Prof. Hutton has a real gift for making complicated concepts easy to understand for
@frognik79
@frognik79 4 года назад
Take a shot every time he says "function".
@jakegore759
@jakegore759 4 года назад
did this, am currently having my stomach pumped
@BicyclesMayUseFullLane
@BicyclesMayUseFullLane 4 года назад
Well given he is talking about a functional programming concept, I hope you don't get alcohol poisoning from that. Edit: welp, too late.
@SteelSkin667
@SteelSkin667 4 года назад
chjAlleNge aCCcepted
@RussellRiker
@RussellRiker 4 года назад
1 shot, 2 shots, 3 shots, floor.
@yyny0
@yyny0 4 года назад
those functional programmers and their functions...
@nO_d3N1AL
@nO_d3N1AL 4 года назад
Excellent video - should be on the tutorial page for Haskell. Well-explained, understandable but not overly simplified or verbose.
@yommish
@yommish 5 месяцев назад
As someone who is not a programmer it is curious about it, this video is the first time I’ve actually understood fundamentally how functional programming is different from object oriented programming and how it could be useful. It just made something in my brain click. Although reading the other comments made me confused again.
@jimgolab536
@jimgolab536 3 года назад
This is very clear. The motivating cm example at the end was extremely helpful. Thanks!
@xichaopeng7904
@xichaopeng7904 4 года назад
Thanks for having Mr. Fincher as a guest I love his work
@SakataSamig
@SakataSamig 4 года назад
Just what I needed. Been a bit confused witn curried function or high order function.
@inversnone
@inversnone 4 года назад
Computerphile and Graham Hutton have been delivering quite a nice slew of videos lately. Would you mind grouping them into a playlist? Would be easier to know if I'm missing something.
@haos4574
@haos4574 2 года назад
You made me understand at exactly 6:20 - 6:30, it's so clever! Thank you!
@indonesiamendaurulang
@indonesiamendaurulang 2 года назад
this is really a very easy to understand explaination, much thanks !!
@valtersanches3124
@valtersanches3124 7 месяцев назад
So it works exactly as a state machine? Takes in a single parameter at a time and updates it's internal state accordingly until it completes it's purpose
@HasanBasri-vf2kg
@HasanBasri-vf2kg 2 года назад
Thank you very much for clear explanations to understand the topic
@savaged
@savaged Год назад
Excellent explanation of currying and even better comic timing!!
@danielchequer5842
@danielchequer5842 4 года назад
This video actually made me hungry for hearing curried so many times
@albertofabbri1543
@albertofabbri1543 3 года назад
Thank you very much for the very clear explanation!
@washingtonlgois
@washingtonlgois 2 года назад
Wow, the example of the cash machine made so easier to understand this! Thank you so much!
@nilp0inter2
@nilp0inter2 4 года назад
The best functional programming teacher out there!
@nihilistbookclub5370
@nihilistbookclub5370 4 года назад
Hey, can you make a video explaining root files and the CERN ROOT system? it's slightly more complex than i thought it would be
@moritzschmidt6791
@moritzschmidt6791 4 года назад
One example that helped me to understand currying in Haskell: (>) is defined as: Ord a => a -> a -> Bool filter is defined as: (a -> Bool) -> [a] -> [a] If you want to filter all elements > 4 from a list, you can do it like so: filter (>4) [1..10] Since (>4), which is curried, is defined as: (Ord a, Num a) => a -> Bool It can be passed to filter.
@victoriakee61
@victoriakee61 Год назад
Thank you, thank you, thank you for breaking it down with the cash machine problem.
@DanieleFilaretti
@DanieleFilaretti Год назад
loved the cash machine example! great video!
@zewdiherring9528
@zewdiherring9528 2 года назад
Cash machine example made it all come together!
@mr7clay
@mr7clay 4 года назад
Does Haskell automatically memoize curried functions? Like if `add x` did some expensive calculation, and you stored `addFive = add 5`, would addFive 7 re-perform the calculation? In JS the args would be captured in the closure, but all the execution would repeat.
@NiDeCo
@NiDeCo 4 года назад
No, but it does do inlining when possible, which is even more efficient than memoizing.
@ntzst1018
@ntzst1018 4 года назад
Study with zoom day 10:🤦 Computerphile new video:💃
@0x6e95
@0x6e95 4 года назад
Being new to Haskell (I've heard of it but haven't really familiarized myself with its syntax), that initial example of currying confused me a bit. Perhaps it would have been better if he first expressed it explicitly with lambda functions.
@the_niss
@the_niss 4 года назад
The cashmachine is a very good example
@Bestape
@Bestape 4 года назад
Is there a practical difference other than maybe speed and brevity between this and getting the same result via nested functions with if statements?
@sdsdfdu4437
@sdsdfdu4437 4 года назад
Function composition and higher order functions
@Bestape
@Bestape 4 года назад
@@sdsdfdu4437 Thanks! I think that's what I mean by brevity and speed but in reverse order. I'm assuming higher order is slower.
@sdsdfdu4437
@sdsdfdu4437 4 года назад
@@Bestape speed depends on the implementation, not the concept. The ghc (glaskow haskell compiler) is very efficient and can produce very fast and optimized programs.
@huycao8521
@huycao8521 3 года назад
thank you for the great content :D
@2eath
@2eath 4 года назад
The examples don't really explain what the difference of input arriving one at a time vs all at once from a software point of view. To me they are the same. This makes sense if is applied to a real hardware. Am I to understand that this curried function is generally more applicable to hardware implementations?
@nerdophile6945
@nerdophile6945 4 года назад
Curried function, sounds a bit spicy. I see what you did there!!
@JNCressey
@JNCressey 4 года назад
why does it give an error instead of maybe a little description saying that it's returned a function?
@DutchmanDavid
@DutchmanDavid 4 года назад
That's because Haskell's error messages are dreadful! Elm (a language based on Haskell) does a *much* better job, but only transpiles to JS, so its area of usage is different.
@xybersurfer
@xybersurfer 4 года назад
i would say that Schönfinkel's contribution is the most important one to lambda calculus
@musikSkool
@musikSkool 4 года назад
Is there a real need for flow charts to aid in programming? Or does it not really help with the move to object oriented programming.
@xybersurfer
@xybersurfer 4 года назад
one of the cool things about functional programming is that it's easier to capture in a flowchart than imperative programming
@musikSkool
@musikSkool 4 года назад
@@xybersurfer I guess, but I could always keep track of what I was doing without one. I suppose if my higher-ups wanted one I could make one.
@guanche011
@guanche011 4 года назад
Those Haskell error messages need some work :)
@edgbaston149
@edgbaston149 2 года назад
Thank you so much
@BinaryReader
@BinaryReader 4 года назад
Haskell doesnt help explain these concepts. Something with a less esoteric syntax would be more understandable. From a haskell programmer.
@Bayo106
@Bayo106 4 года назад
Yea it's a ibt weird they chose this. Maybe they did it because Haskell is a functional language?
@BinaryReader
@BinaryReader 4 года назад
@Sydney Bean JavaScript perhaps? const f = x => y => x + y ?
@technicalfool
@technicalfool 4 года назад
@Sydney Bean From ruby-doc.org: def foo(a,b,c) [a, b, c] end proc = self.method(:foo).curry proc2 = proc.call(1, 2) #=> # proc2.call(3) #=> [1,2,3]
@evergreen-
@evergreen- 4 года назад
I think Swift’s syntax makes most sense. You can see clearly what types are expected in the definition: func plus(_ a: Int) -> (_ b: Int) -> Int { return { b in return a + b } } let plus5 = plus(5) // (Int) -> Int plus(5)(4) // 9 plus5(4) // 9
@NiDeCo
@NiDeCo 4 года назад
@@evergreen- If you put the type definition with the function in Haskell, it's even easier to see what's happening IMHO plus :: Int -> Int -> Int plus a b = a + b -- or plus = \a -> \b -> a + b Putting the type definition above top-level functions is common practice in Haskell, he just didn't do it because it was in a REPL and explaining types wasn't in the scope of the video.
@arcanics1971
@arcanics1971 4 года назад
08:15 Ah, this explains why I am overdrawn!
@roberthunter5059
@roberthunter5059 4 года назад
I've always wondered how HP calculators were programmed.
@Bin216
@Bin216 4 года назад
Robert Hunter HP calculators often throw reverse polish notation into the mix as well...
@theQuickRundown
@theQuickRundown Год назад
"Schönfinkeled functions" sounds so fancy, should rename it :D
@nwpgunner
@nwpgunner 4 года назад
This haunted me in uni because professors didn't explain it as well
@maxyoucef6454
@maxyoucef6454 4 года назад
-quite-amazing-
@VBKing2
@VBKing2 4 года назад
Brilliant
@John-pn4rt
@John-pn4rt 4 года назад
does Graham Hutton only have blue gingham shirts?
@AaronTheGerman
@AaronTheGerman 4 года назад
Why use inc if you can have the succ?
@davidjohnston4240
@davidjohnston4240 4 года назад
If a cash machine was a curried function, you bank balance would never change and you could always get another 100 out.
@kenziephillips
@kenziephillips 4 года назад
Is it just me or are curried functions just internal state with more steps? Not very functional of them... But in all seriousness, thanks for the simple explanation.
@kenziephillips
@kenziephillips 4 года назад
@Mike Yeah that makes sense. I was thinking that the state was changing, but in the case of add, it only changes once and in an entirely predictable way.
@vedant9173
@vedant9173 4 года назад
So is it similar to decorators one Python?
@marynakosiv3750
@marynakosiv3750 3 года назад
thanks a lot!
@kebman
@kebman 4 года назад
This video made me hungry... Couldn't find any Curry, so I went with Mexican. It's a bit spicy too, so hope that's acceptable!
@shivanisharma-kf2ti
@shivanisharma-kf2ti 3 года назад
Thank you
@firstnamelastname2805
@firstnamelastname2805 4 года назад
Thanks for trying, but this video makes curried functions seem unnecessary and confusing...🤔
@jpisello
@jpisello 4 года назад
They can be really useful when you need to "carry around" a value that you want to use with some additional function later, perhaps long after the original value has gone out of scope. They can also be really confusing :-)
@misterhat5823
@misterhat5823 4 года назад
Exactly what I was thinking. He explained what they are clearly enough, but I can never see where I'd care.
@papikabron18
@papikabron18 4 года назад
Very interesting
@ReddSpark
@ReddSpark 3 года назад
1. I didn't get 4:28 - it's literally saying you should didn't give two values , so how does that prove the point about not needing to give two values at the same time? 2. The example at the end finally made something click - will now watch it all a second and possibly a third time! 3. Second viewing and I'm now even more confused. Weill look for another video.
@Tweakimp
@Tweakimp 4 года назад
It would be easier to follow if you had him as picture in picture in a corner and not constantly switch between him and the code.
@immabreakaleg
@immabreakaleg 3 года назад
concept in python: ``` def curried_f(x): return lambda y: x + y print(curried_f(2)(3)) ```
@georganatoly6646
@georganatoly6646 4 года назад
I think a 'curried' function falls into the category of something that most programmers know and use often but doesn't know to call them 'curried' functions. I actually find not naming some things in computer science to be more beneficial for communication rather than obfuscating frequent, naturally arising patterns behind unnecessary jargon. Jagged arrays in C# is another example.
@louisconstant8214
@louisconstant8214 Год назад
Also: monads.
@Janokins
@Janokins 4 года назад
"Just take out the brackets" How do you do that in a more C-like language like C, C++, C#, Java, etc.?
@cannaroe1213
@cannaroe1213 4 года назад
You write three functions and run them one after the other. Currying is more of a syntax shorthand than a mathematical truth of the universe.
@jeffspaulding9834
@jeffspaulding9834 4 года назад
In C you use function pointers. The syntax is pretty horrible, but it can be done. But more to the point, you just don't do this in C, or any of those other languages you mentioned, because it's not idiomatic. Haskell programmers expect you to use currying because that's part of how you program Haskell, just like Scheme programmers expect you to use closures to accomplish more-or-less the same thing (more verbose syntax, but more flexible). Try currying in most C-family languages and all you cause is confusion, because if you're using currying in those languages then you're doing it wrong. The languages weren't intended for that paradigm, and other programmers will struggle to follow your logic.
@oliverarmitage1966
@oliverarmitage1966 4 года назад
was rly hoping this would be an april fools curry recipe
@Submersed24
@Submersed24 Год назад
I still don't fully understand why you would even want to use it in js besides for front end.
@TheR971
@TheR971 4 года назад
5:02 I don't see the point. Yes, that was a FP pun.
@greglee7708
@greglee7708 4 года назад
functional programming is the most interesting
@lawrencedoliveiro9104
@lawrencedoliveiro9104 4 года назад
I don’t like pure functional-programming languages, but I like using functional constructs in procedural languages like Python which make them very handy.
@pseudo_goose
@pseudo_goose 4 года назад
The cuts to the black text on white background is giving me a headache...
@lasersimonjohnson
@lasersimonjohnson 4 года назад
We spent years developing high level languages to make code easier to write and more readable/ easier to understand. This just dumps all over that 😂
@igoralmeida9136
@igoralmeida9136 4 года назад
why?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 4 года назад
You sound like a Java programmer.
@yash1152
@yash1152 11 месяцев назад
4:51 map (add 1) [1..10] woah, awesome :)
@otesunki
@otesunki 3 года назад
Help. Javascript does this. > let add = x=>y=>x+y x=>y=>x+y > let add2 = add(2) y=>x+y > add2 y=>x+y > add2(4) 6 WHAT
@user-tv9gk8df1u
@user-tv9gk8df1u 2 года назад
Does curry create side effects?
@jamesgrimwood1285
@jamesgrimwood1285 4 года назад
So now I know what one is, and even how to define one... But I don't know why they're used.
@cannaroe1213
@cannaroe1213 4 года назад
To be a computer scientists requires, more or less, one human unit of brain power/memory/time If the job requires less, it's vocabulary will be expanded until it does.
@DutchmanDavid
@DutchmanDavid 4 года назад
Because it's mentally easier to follow Map (add 5) [1..10] Over Map f [1..10] Where f n = n + 5 It does the same thing, but once you're used to the style, the first version will be preferred :)
@DutchmanDavid
@DutchmanDavid 4 года назад
In other words: to create more functionality with as little as code needed.
@hoagy_ytfc
@hoagy_ytfc 4 года назад
Woah, "Haskell" rhymes with "Pascal"?!
@sdsdfdu4437
@sdsdfdu4437 4 года назад
Not really. 'el' and 'al' are different
@jeffspaulding9834
@jeffspaulding9834 4 года назад
Depends on the dialect. As a native Oklahoman, I say Haskell like "has skull" and Pascal with the same a sound as Haskell but the "al" sounds like "owl." I also put inflection on the "Has" in Haskell and the "al" in Pascal.
@kmac499
@kmac499 4 года назад
Methinks the output from a curried function is highly deterministic and immutable.
@kmac499
@kmac499 4 года назад
@MichaelKingsfordGray I was thinking more of the Sunday am thunderbox visit after the Saturday night down the local star of Bengal. 😉😉
@ekremdincel1505
@ekremdincel1505 4 года назад
4:48 *_magic_*
@BicyclesMayUseFullLane
@BicyclesMayUseFullLane 4 года назад
Higher-order function is fun.
@ekremdincel1505
@ekremdincel1505 4 года назад
8:43 lol comoney
@hayuseen6683
@hayuseen6683 4 года назад
add = \x -> (\y -> add x+y) Behold the function to add all
@elie3423
@elie3423 4 года назад
It's a design pattern btw
@grainfrizz
@grainfrizz 4 года назад
haskell dude
@ChristiaanMeyer
@ChristiaanMeyer 3 года назад
You say you don't need to give all of their inputs and then it doesn't work and then you continue to say it works without all the inputs even though it didn't?
@zenawarrior3012
@zenawarrior3012 4 года назад
The whole world is using Zoom, along with many stories of it being insecure. Do you guys know if this app is safe or tips on how to safely use it? I was a little stunned when my children's school decided to use that as a form of communication.
@zenawarrior3012
@zenawarrior3012 4 года назад
@@analogueavenue Yes, well, that is why I'm asking if it's a school requirement. Was it the app, or user error? People don't tend to understand security settings.
@zenawarrior3012
@zenawarrior3012 4 года назад
@K.D.P. Ross I am sorry if the question offends you, but these guys are known in the US for their top notch cybersecurity. The only way to get a question through to them is through RU-vid. It is relevant since zoom went from 3 million users to 200 million. This channel keeps up with current events as well as coding. They are the best.
@aylictal
@aylictal 3 года назад
To show how much javascript has evolved in relation to the above and how similar it is to the arrow functions he was making: const add = x => y => x + y add(2)(3) The older way of doing it: var add = function(x){ return function(y){ return x+y } } add(2)(3) And finally, performing a spread operation to functional arguments (aka, an unknown amount of arguments): const add = (...args) => args.reduce((x, y) => x+y) add(2,3,4,5,6,7,8)
@sharpfang
@sharpfang 4 года назад
Let's take a finite state machine and hammer it into a functional language digestible format.
@haraldehrling8528
@haraldehrling8528 4 года назад
I have a question. When we use our pass code the code moves thought encryption and if the rubbish match the computer understand that we put the correct pass code but how does it understand the pattern lock we use on our smartphone?
@isaactfa
@isaactfa 4 года назад
Basically, each vertex of the grid gets assigned a number from 0 to 8, zero being in the top left corner, 8 being in the bottom right. A pattern, then, is just a sequence of vertices in the order you need to hit them in. For example, when you swipe across the entire top row and then down the entire right column, creating a right angle shape, the pattern is 0-1-2-5-8. That is then turned into a byte array and stored as an unsalted SHA-1 hash and compared to whatever you put in. Essentially, it works the very much like a passcode.
@haraldehrling8528
@haraldehrling8528 4 года назад
@@isaactfa thanks I desperately wanted that answer. 😊 you just gained another subscriber.
@robertkelleher1850
@robertkelleher1850 2 года назад
This seems more a quirk of Haskell, than a fundamental computer science concept. The problem is universal (how to feed parameters to a function one at a time), but the solution doesn't feel universal.
@mzaman8660
@mzaman8660 4 года назад
This video would be better with a proper mic. Audio seems to be very poor.
@narlzac85
@narlzac85 4 года назад
Started off strong, then once he got to the curried function itself, there was no explanation of why or where you would use this or even a demonstration of the function that was written.
@raylee2292
@raylee2292 4 года назад
Hey ATM, give my card back
@benjaminbrady2385
@benjaminbrady2385 3 года назад
8:42 Can we please change our bank notes to look like that
@gatoradeee
@gatoradeee 2 года назад
SPICY
@user-vn7ce5ig1z
@user-vn7ce5ig1z 4 года назад
0:42 - I thought he said Pascal. I was excited for a moment there. :-|
@nodroGnotlrahC
@nodroGnotlrahC 4 года назад
I thought he said Schoenberg was a "mathematician and magician".
@jeffspaulding9834
@jeffspaulding9834 4 года назад
Hrm, I just checked and apparently Pascal does have function pointers. So you could most likely do currying in Pascal. Not sure why you'd want to, but that's never stopped anyone before.
@kebman
@kebman 4 года назад
Looks a bit like anonymous functions in JavaScript...
Далее
Lambda Calculus - Computerphile
12:40
Просмотров 999 тыс.
skibidi toilet 74
07:02
Просмотров 11 млн
The purest coding style, where bugs are near impossible
10:25
TCP Meltdown - Computerphile
14:52
Просмотров 219 тыс.
Taming Kerberos - Computerphile
16:06
Просмотров 319 тыс.
What is a Monad? - Computerphile
21:50
Просмотров 590 тыс.
Tail Recursion Explained - Computerphile
16:05
Просмотров 168 тыс.
Functional Programming & Haskell - Computerphile
9:19
Просмотров 656 тыс.
Semantics: Lambda Calculus and Types
19:08
Просмотров 9 тыс.
skibidi toilet 74
07:02
Просмотров 11 млн