How can I learn to functional programming using only C ? I want to do it functionally. Is there a book on this...

How can I learn to functional programming using only C ? I want to do it functionally. Is there a book on this? I want ot do it functionally. I just odn't know what to do to be honest. I don't k,nwo any programming langauges anymore. I am no longer famous.

Attached: 1512685763735.jpg (776x651, 95K)

Other urls found in this thread:

cs.cornell.edu/courses/cs3110/2018fa/textbook/
cs.uwaterloo.ca/~plragde/flaneries/FDS/
fstar-lang.org/
pdfs.semanticscholar.org/31ac/b7abaf3a1962b27be9faa2322038d1ac9ed7.pdf
twitter.com/NSFWRedditImage

am i an insect

Step 1. Write functional programs
Step 2. Use C

I dont know how? I dont even know how to program

Don't do drugs

I'm also interested in this. Any functional fag here cares to explain?

>how do I learn to drive a motorcycle with just a car?

If you honestly think those statements are equivalent you know nothing of programming

I'm me. You're you

Take this OCaml course
It has it's own textbook: cs.cornell.edu/courses/cs3110/2018fa/textbook/

After do a purely functional datastructures book:
cs.uwaterloo.ca/~plragde/flaneries/FDS/

Interesting part of functional style programming is you can do pattern matching over 'algebraic datatypes' (you'll find out what that means in the Cornell course).
This allows you to easily implement those datastructures in the above text (or the classic Okasaki book: Purely Functional Datastructures). By easy I mean, you as a total pleb can just guess your way through what should be happening and construct yourself a red-black tree, splay tree, ect no problem. You make one type red, and another type black, and write an invariant that says they should never be side by side. Run the compiler, oops says you missed a case. Fix aaaand you're done. That's the secret of functional programming is it's dead simple to do anything. You don't always want a functional style of course, but if something appears very difficult to reason about you can easily do so functionally just writing tests (invariants) and implementing something that passes the tests.

Ocaml isn't C!!!!!

it's okay to learn more things, user

It compiles to C you can also use F* fstar-lang.org/ or you know, you learn functional style then you just program C in that method, example this book: pdfs.semanticscholar.org/31ac/b7abaf3a1962b27be9faa2322038d1ac9ed7.pdf

Also this is much easier just using assembly than C, on any X86 von Neumann arch machine, you could do anonymous functions in asm and closures, so would want to alter your C compiler to do

Too hard. I need intro to programming tier. It's I'm C. But from a purely functional perspective. I'm a hs senior who's being held back. I've never programmed before

Read SICP and use some scheme that outputs C. Problem solved.

How can I learn to heterosexual sex using only gay sex? I want to do it heterosexually. Is there a book on this? I want ot do it heterosexually. I just odn't know what to do to be honest. I don't k,nwo any sexual orientations anymore. I am no longer famous.

I am hetero. Hetero.

Using C to write functional programs is technically possible, but it's going to raise the difficulty level to the point where you'll have a very hard time learning anything.

At the very least, use a language with a garbage collector if you want to learn FP. Yes, you can go back to write FP programs in C when you fully understand it, and large parts of the GNU C compiler were prototyped in ML and translated to C. But as a newbie, you should learn a functional language that naturally enforces a functional style.

OCaml is a very good suggestion here imho. F# or Haskell are also good. Haskell is a bit better at forcing you to write functional code, but it also has a bit more "magic" like lazy evaluation.

source?

I want to learn TCL really bad bad bad i want to make emacs and bury myself in my pc using tcl or action scirpts thanks danke danke

uh you can pass around function pointers, so you can do stuff like map, reduce and other higher order functions
but they will be untyped and you can't do lambdas in C
pick something else to learn functional programming. then come back to C and apply the concepts there.