Functional And Concurrent Programming By Michel Charpentier Index (CloudMonk.io)

Functional and Concurrent Programming by Michel Charpentier Index



Return to Functional and Concurrent Programming by Michel Charpentier, Functional and Concurrent Programming Glossary, Functional and Concurrent Programming, Functional Programming, Functional Languages, Functional Programming Concurrency, Functional Bibliography, Functional Courses, Functional Glossary, Awesome Functional, Functional GitHub, Functional Topics

Fair Use Source: B0B8S2QNM9 (FnCncrPg 2022)



Symbols



* ::: (concat), 59, 85–86

* :: (cons operator or method reference) cons operator, 31. See also functional lists

* method reference, 124, 134, 263

* - (contravariance annotation), 238–239. See also contravariance

* + (covariance annotation), 237–239. See also covariance

* >: (lower type bound), 176, 242. See also type bounds

* | (pipe)

* pattern matching alternatives, 47. See also pattern matching

* type union, 54, 222, 226–227. See also types

* & (type intersection), 222, 227, 243, 248. See also types

* _ (underscore)

* for partial application, 125–126, 134, 248. See also partial application

* in pattern matching, 47–48, 50–52, 58–59. See also pattern matching

* () (unit value), of type Unit, 23, 222

* <: (upper type bound), 177, 241–243, 248. See also type bounds



A



* abstract data types (ADT), 224–225, 250

* actions, 23–26

* composition of, 10–11

* tasks implemented as, 274–277, 284, 355, 370, 379, 384–386, 390–391, 397

* versus pure functions, 24, 32–34, 63–64

* actors, 407–410, 414–415. See also non-blocking synchronization

* ad hoc polymorphism, 232, 248, 251–252. See also polymorphism

* ADT. See abstract data types

* algebraic data types, 6, 48–56, 60–61

* anonymous functions. See function literals

* append list function, 86, 90–91

* arguments

* by-name, 175–178, 192, 207, 279, 376, 424. See also lazy evaluation

* delayed evaluation of, 173–174, 193. See also thunks

* named, 16–17, 19

* optional, 16, 19

* repeated, 15, 19

* async/await, 406–407, 414. See also non-blocking synchronization

* asynchronous operations, 255–258, 307–311, 371–372. See also higher-order functions

* atomic operations, 259, 271–277. See also check-then-act; compare-and-set

* by locking, 279–284, 289–290, 296

* interleaving of, 272–277, 293–295




B



* barrier. See cyclic barrier synchonization

* behavioral subtyping, 223–224, 229–230, 235–244. See also subtyping

* Bjarnason, Rúnar Óli, 210

* blocking queue synchronizer, 342–346, 349–354. See also producer-consumer pattern

* busy-waiting, 322–325, 335. See also sleeping for synchronization

* bytecode examples

* atomicity, 272

* locking, 292

* tail recursion , 72–73


C



* callbacks

* asynchronous on futures, 384–386, 390–391, 397, 414

* synchronous by higher-order functions, 133, 135

* CAS. See compare-and-set

* check-then-act, 276–277, 282–283, 289–290, 344, 400–401, 414. See also atomic operations

* closures, 130–134, 377. See also scoping

* collections. See data structures

* compare-and-set (CAS), 400–404, 414. See also atomic operations

* composition

* of actions, 10–11

* of functions, 10–12

* of objects, 172, 231–232

* comprehension

* for-comprehension, 35–37, 153–155, 212–213, 317, 362, 389, 407. See also higher-order functions

* list comprehension, 154–155

* concat list function (:::), 59, 85–86

* condition synchronizer, 343–346, 354, 364–366. See also locks

* cons (::), 31. See also functional lists

* consumer. See producer-consumer pattern

* contains list function, 80–81

* contravariance, 238–240, 251–252. See also variance,

* annotation (-), 238–239

* restrictions on, 239

* control abstraction, 176–179, 193

* coroutines, 407, 412–413. See also async/await

* count higher-order function, 138

* countdown latch synchronizer, 325–328, 334, 339–340, 354

* covariance, 222, 237–240, 244, 251–252. See also variance

* annotation (+), 237–239

* restrictions on, 238

* currying, 5, 118–120, 134, 148. See also partial application

* cyclic barrier synchronizer, 340–341, 354


D



* daemon threads, 264, 313

* data structures. See also functional lists; trees; streams; thread-safety

* lock-free, 401–404

* mutable versus immutable, 29–30

* parallel, 314–319, 362

* recursive, 6, 53–54, 61, 69–71

* deadlocks, 259, 304–306, 325–327, 335–336, 342, 374, 382–383, 391,

* debugging with thread dumps, 328–329, 336

* of tasks and not threads, 412–415

* default arguments. See arguments

* defensive copies, 33–34, 37, 56, 289, 291, 296

* domain specific language (DSL), 179, 194. See also control abstraction

* drop list function, 82–84, 89

* dropWhile higher-order function, 139

* DSL. See domain specific language

* duck typing. See structural subtyping

* dynamic binding. See subtype polymorphism

* dynamic dispatch. See subtype polymorphism



E



* error handling. See failure handling

* exceptions, 48, 177, 195–197, 199, 201–204

* exists higher-order function, 137–138, 152, 164–165

* expressions, 25–28, 36,

* code block as, 14

* if-then-else as, 10, 26, 28, 36

* statements versus, 25–26

* switch as, 28, 47, 60

* extension methods, 13–14, 178, 247. See also methods

* extractors, 59–61. See also pattern matching



F



* failure handling, 6, 195–204

* of futures, 199, 374, 394–395

* using higher-order functions, 198, 200–204

* filter, filterNot higher-order functions, 138, 142, 154–155

* find higher-order function, 116–118, 167–168

* flatMap higher-order function, 141–146, 153, 155, 211–213, 388–389, 393– 394

* flatten

* list function, 87

* on futures, 389

* fold, foldLeft, foldRight higher-order functions, 146–148, 152, 155, 165–166

* forall higher-order function, 137–138

* foreach higher-order function, 140–141, 152–155

* fork-join pattern, 266, 318, 339

* without blocking threads, 395–397, 405–406, 414

* fork/join pools, 405–406, 414. See also non-blocking synchronization

* for-yield, for-do. See comprehension

* function literals, 5–6, 120–123, 134. See also higher-order functions

* as lambda expressions, 120–122

* by partial application, 125–126

* by pattern matching, 122–123

* functional lists, 31–32, 35–37, 51–53, 225, 236–237, 297. See also recursive data structures

* data sharing in, 6, 31–32, 83

* recursion on, 75, 79–96

* functional variables, 26–30, 37

* functional object-oriented programming, 28–30, 32–37, 43–45

* functions, 4–6, 9–20. See also recursive functions; higher-order functions

* composition, 10–12

* curried, 118–120, 134, 148

* local, 14–15, 19

* pure, 21–25, 34, 36, 41–43, 95, 97, 160

* tasks implemented as, 369–370, 387, 418

* versus methods, 12, 123–124, 134

* functors, 144–146

* futures, 369–397. See also promises

* cancellation, 374, 393

* higher-order functions on, 385–397, 414

* as synchronizers, 371–380, 397



G



* getAt list function, 84

* group list function, 88–89

* groupBy, groupMap higher-order functions, 150–151, 156


H



* happens-before. See Java memory model

* head list function, 37, 51

* Heisenbugs, 277, 278

* higher-order functions, 6, 94, 115–156, 239–240. See also function literals

* as the basis for comprehensions, 153–155

* count, 138

* from currying, 118–120

* dropWhile, 139

* exists, 137–138, 152, 164–165

* for failure handling, 198, 200–204

* filter, filterNot, 138, 142, 154–155

* find, 116–118, 167–168

* flatMap, 141–146, 153, 155, 211–213, 388–389, 393–394

* fold, foldLeft, foldRight, 146–148, 152, 155, 165–166

* forall, 137–138

* foreach, 140–141, 152–155

* on futures, 385–397, 414

* groupBy, groupMap, 150–151, 156

* for inversion of control, 133, 135

* iterate, 148, 155

* map, 140–142, 153–155, 211, 387–389

* maxBy, 149–150, 156

* minBy, 149

* parallel evaluation of, 314–319, 362

* partition, 138–139

* reduce, 147

* sortBy, sortWith, 149–150, 156

* span, 139

* tabulate, 148

* takeWhile, 139

* unfold, 148–149, 155

* versus loops, 185–187

* zipWith, 388–389, 411



I



* if-then-else expression, 10, 26, 28, 36

* impure functions. See pure functions

* inference. See types

* infix operators as methods, 12–13, 19

* inheritance, 231–232

* invariance. See non-variance

* isEmpty list function, 52

* iterate higher-order function, 148, 155

* iterators, 185–188. See also lazy evaluation



J



* Java memory model (JMM), 265, 286–287, 291, 330–334, 336

* Java virtual machine (JVM), 260–261, 265, 268, 271, 279, 284, 329

* JMM. See Java memory model

* JVM. See Java virtual machine



L



* lambda calculus, 3, 5, 124

* lambda expression, 5–6, 120–122, 134, 174. See also function literals

* implement SAM interfaces with, 124–125, 263, 268, 371

* last list function, 75, 79–80

* latch. See countdown latch synchronizer

* late binding

* in scoping, 126

* in subtype polymorphism, 233

* lazy evaluation, 7, 167–168, 173–194. See also streams

* of arguments, 7, 175–178, 192, 207, 279, 376, 424

* with iterators, 185–188

* for lazy initialization, 190–191, 194

* with views, 7, 167–168, 188–190, 194

* length list function, 81–82

* Liskov substitution principle. See behavioral subtyping

* list functions

* append, 86, 90–91

* concat (:::), 59, 85–86

* contains, 80–81

* drop, 82–84, 89

* flatten, 87

* getAt, 84

* group, 88–89

* head, 37, 51

* isEmpty, 52

* last, 75, 79–80

* length, 81–82

* reverse, 90–91, 96

* splitAt, 89

* tail, 37, 51

* take, 84–85, 94–95

* zip, 87–88

* lists. See functional lists

* lock-free algorithms. See compare-and-set

* locks, 278–284, 337–339, 341–342, 353. See also condition synchronizer; synchronization

* enabling client-side locking, 289–290, 299–300

* exclusive, 278–284

* intrinsic, 279–284

* read-write, 338–339, 353–354

* reentrancy, 281, 284, 289, 300, 338, 341–342

* splitting, 303–305

* as synchronizers, 324, 335

* loops

* versus higher-order functions, 133, 146, 176

* versus recursion, 6, 63–65, 74



M



* map higher-order function, 140–142, 153–155, 211, 387–389

* maxBy higher-order function, 149–150, 156

* memoization

* with closures, 130–131. See also thread-safe caching illustration

* in streams, 180, 194

* memory model. See Java memory model

* methods

* extension, 13–14, 178, 247

* infix operators as, 12–13, 19

* versus functions, 12, 123–124, 134

* minBy higher-order function, 149

* model checking, 268, 346–349

* monads, 144–146

* multiple dispatch. See subtype polymorphism


N



* Nil. See functional lists

* nominal subtyping, 230–231, 245, 251. See also subtyping

* non-blocking synchronization. See also higher-order functions

* with actors, 407–410, 414–415

* with async/await, 406–407, 414

* with fork/join pools, 405–406

* non-variance, 237–244. See also variance

* nondeterminism, 259, 263–264, 267, 269, 272, 274

* null versus options for handling failures, 50, 176, 195–197


O



* options, 50–51,

* for failure handling, 142–143, 197, 204


P



* pairs. See tuples

* parallel data structures, 314–319, 362

* parallel server illustration, 309–311, 372–374, 383, 385, 390–392, 405–408, 411

* parametric polymorphism, 17–20, 233, 235–244, 251. See also polymorphism

* partial application, 125–126, 134, 248. See also function literals

* partition higher-order function, 138–139

* pattern matching, 6, 47–61

* on algebraic data types, 48–56, 60–61

* to define function literals, 122–123

* for runtime type checking, 48

* for switching, 47–48, 60

* performance, 6, 29, 45, 85–86, 90–92, 94–96, 147–148, 173–174, 281, 303, 311, 316, 322, 324, 330, 335, 343, 383, 397, 414–415

* pipelines

* asynchronous, 394, 411–412

* handling failures in, 201–203

* lazily evaluated, 182–183, 186–187, 201–202

* poison pills, 352–353

* polymorphism, 232–244, 247–252

* ad hoc, 232, 248, 251–252

* parametric, 17–20, 233, 235–244, 251

* subtype, 233–235, 249–251

* procedures. See actions

* producer. See producer-consumer pattern

* producer-consumer pattern

* through blocking queues, 349–354

* through lazy evaluation, 180–181

* product types. See algebraic data types

* promises, 375–380. See also futures

* pure functions, 21–23,

* versus actions, 24–25



Q



* queues, 86,

* blocking, 311–312, 342–346, 349–354

* thread-safe, 297–306, 350–351


R



* reactive streams, 411–412, 415

* read-write locks, 338–339, 353–354

* recursive data structures, 53, 69–71, 77. See also functional lists; trees

* recursive functions, 54

* designing, 67–69, 77, 80

* as equalities, 79–88, 96

* with tail recursion , 71–77, 81–82, 94–96, 205–209

* termination, 67–69, 93

* versus loops, 6, 63–65, 74, 77, 82, 95, 133

* reduce higher-order function, 147

* referential transparency, 27–28. See also functional variables

* reverse list function, 90–91, 96


S


* SAM. See single-abstract-method interfaces

* scatter-gather. See fork-join pattern

* scoping, 126–129. See also closures, static (lexical) vs dynamic (late binding), 126

* semaphore synchronizer, 341–343, 354, 407

* shadowing of variables, 126. See also scoping

* Shevchenko, Ruslan, 406

* side effects, 21–23,

* due to assignments, 27–30

* single-abstract-method interfaces (SAM), 124–125, 134,

* implemented as lambda expressions, 124–125

* sleeping for synchronization, 322, 324, 335. See also busy-waiting

* sortBy, sortWith higher-order function, 149–150, 156

* sorting illustration, 92–94, 139, 381–383, 389

* span higher-order function, 139

* splitAt list function, 89

* statements versus expressions, 25–27. See also side effects

* streams, 7, 180–184. See also lazy evaluation

* as infinite data structures, 184, 194

* as lazy data structures, 180–182, 189, 192–194

* for pipelines, 182–183, 194

* string interpolation, 60

* structural subtyping, 230, 245–248, 251. See also subtyping

* subset-sum illustration, 191–193

* subtype polymorphism, 233–235, 249–251. See also polymorphism

* subtypes, 229–231. See also subtype polymorphism

* as subsets, 222, 229, 250–251

* subtyping. See also subtypes

* behavioral, 223–224, 229–230, 235–244

* nominal versus structural, 230–231, 245, 251

* sum types. See algebraic data types

* switch expressions, 28, 47, 60. See also expressions

* symbolic method names. See infix operators as methods

* synchronization, 257, 259–260, 266, 285–287, 295–296, 321–322, 331–335, 412–415. See also synchronizers; deadlocks

* synchronized. See locks

* synchronizers, 324–325, 335, 337–354. See also synchronization

* blocking queue, 342–346, 349–354

* condition, 343–346, 354, 364–366

* countdown latch, 325–328, 334, 339–340, 354

* cyclic barrier, 340–341, 354,

* future, 371–380, 397

* lock, 324, 335

* semaphore, 341–343, 354, 407


T



* tabulate higher-order function, 148

* tail list function, 37, 51

* tail recursion , 71–77. See also recursive functions,

* compiler optimization for, 72–73, 77

* via trampolines, 76, 205–209

* take list function, 84–85, 94–95

* takeWhile higher-order function, 139

* thread dumps, 262

* debugging deadlocks with, 328–329, 336

* thread pools, 307–319. See also parallel data structures

* as timers, 313–314, 319

* default, 312–313

* fork/join, 405–406, 414

* threads, 255–269. See also thread pools,

* creation, 261–263, 268, 356–357

* daemon, 264, 313

* non-determinism of, 259, 263–264, 267, 269, 272, 274

* termination, 264–266, 268, 351–353

* testing and debugging, 259, 266–269, 277, 328–329, 336, 339–340

* thread-safe caching illustration, 377–379, 427–430

* thread safety, 274, 285–296,

* by compare-and-set, 400–404, 414

* by immutability, 285–286, 290–293, 295–296

* by locking, 287–293, 297–306, 399–400, 402

* thunks, 174–175, 206–207

* timeouts, 337–338, 374

* in non-blocking code, 392–393, 419, 421–424, 427–430

* trampolines, 76, 205–213

* trees, 6, 53–54. See also recursive data structures

* binary, 70, 76, 99–113, 212–213

* N-ary, 70–71, 157–172

* Treiber, R. Kent, 403

* triples. See tuples

* tuples, 48–49. See also algebraic data types

* type bounds, 241–244, 252. See also types

* lower, 241–243, 252

* upper, 242–244, 252

* wildcards in, 241, 243–244

* types, 217–252. See also subtypes

* abstract data types, 224–225, 250

* algebraic data types, 6, 48–56, 60–61

* static versus dynamic typing, 217–219, 221, 250

* strong typing versus weak typing, 217–220, 250

* type bounds, 241–244, 252

* type classes, 245–250, 252

* type inference, 225–229, 251

* type parameters, 17–20, 233, 235–244, 251

* type variance, 235–240



U


* unfold higher-order function, 148–149, 155

* unit value, of type Unit, 23, 141, 222

* use-site variance annotations. See also type bounds


V



* val/var keywords. See functional variables

* varargs. See repeated arguments

* variable-lengths arguments. See arguments

* variance, 235–240. See also types

* views. See lazy evaluation

* virtual methods. See subtype polymorphism

* volatile variables. See Java memory model


Z


* zip list function, 87–88

* zipper illustration, 56–59

* on trees, 169–172

* zipWith higher-order function, 388–389, 411



Fair Use Sources


Fair Use Sources:
* B0B8S2QNM9 (FnCncrPg 2022)


Functional Programming: Functional Programming Compare and Contrast 10 Languages by Cloud Monk (December 2024)



Purely Functional Languages, Purely Functional Programming Languages (Haskell, Elm, PureScript, Agda, Idris, Coq, Lean, Miranda, Erlang, F Sharp | F#)



Popular Functional Programming Languages (Haskell, Scala, Clojure, F Sharp | F#, Erlang, Elm, OCaml, Elixir, Racket, PureScript, Lisp, Scheme, Common Lisp, Rust, Swift, Java, Kotlin, TypeScript, JavaScript, Python, Ruby)



FP, Functional Clojure, Functional Haskell, Functional Erlang, Functional Elixir, Functional F Sharp | Functional F#. Data Oriented Programming, Functional C Plus Plus | Functional C++, Functional C Sharp | Functional C#, Functional Java, Functional Kotlin, Functional Scala, Functional Go, Functional Rust, Functional JavaScript (Functional React), Functional TypeScript (Functional Angular), Functional Swift; Lisp, FP (programming language), Data-Oriented Programming (DOP), Functional and Concurrent Programming, Functional Programming Bibliography - Manning's Programming Functional in, Functional Programming Glossary - Glossaire de FP - French, Awesome Functional Programming, Functional Programming Topics, Concurrency. (navbar_functional - see also , navbar_python_functional, navbar_django_functional, navbar_flask_functional, navbar_javascript_functional, navbar_typescript_functional, navbar_react_functional, navbar_angular_functional, navbar_vue_functional, navbar_java_functional, navbar_kotlin_functional, navbar_spring_functional, navbar_scala_functional, navbar_clojure_functional, navbar_csharp_functional, navbar_dotnet_functional, navbar_fsharp_functional, navbar_haskell_functional, navbar_rust_functional, navbar_cpp_functional, navbar_swift_functional, navbar_elixir_functional, navbar_erlang_functional, navbar_functional, navbar_functional_reactive)









----



Cloud Monk is Retired (impermanence |for now). Buddha with you. Copyright | © Beginningless Time - Present Moment - Three Times: The Buddhas or Fair Use. Disclaimers



SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.



----