Table of Contents
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
Symbols
- ::: (concat), 59, 85–86
- 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
- <: (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
- ADT. See abstract data types
- algebraic data types, 6, 48–56, 60–61
- append list function, 86, 90–91
- by-name, 175–178, 192, 207, 279, 376, 424. See also lazy evaluation
- named, 16–17, 19
- optional, 16, 19
- repeated, 15, 19
- async/await, 406–407, 414. See also non-blocking synchronization
- by locking, 279–284, 289–290, 296
- interleaving of, 272–277, 293–295
B
- behavioral subtyping, 223–224, 229–230, 235–244. See also subtyping
- Bjarnason, Rúnar Óli, 210
- atomicity, 272
- locking, 292
- tail recursion , 72–73
C
- 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
- collections. See data structures
- of actions, 10–11
- of functions, 10–12
- of objects, 172, 231–232
- 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
- 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
- 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
- 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
- default arguments. See arguments
- defensive copies, 33–34, 37, 56, 289, 291, 296
- drop list function, 82–84, 89
E
- 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
- find higher-order function, 116–118, 167–168
- flatMap higher-order function, 141–146, 153, 155, 211–213, 388–389, 393– 394
- list function, 87
- on futures, 389
- 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
- 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
- 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
- cancellation, 374, 393
- higher-order functions on, 385–397, 414
- as synchronizers, 371–380, 397
G
H
- 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
- find, 116–118, 167–168
- flatMap, 141–146, 153, 155, 211–213, 388–389, 393–394
- forall, 137–138
- foreach, 140–141, 152–155
- on futures, 385–397, 414
- 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
- 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
- infix operators as methods, 12–13, 19
- inheritance, 231–232
- invariance. See non-variance
- 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
- 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
- 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
- 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
- in streams, 180, 194
- extension, 13–14, 178, 247
- infix operators as, 12–13, 19
- versus functions, 12, 123–124, 134
- model checking, 268, 346–349
- monads, 144–146
N
- Nil. See functional lists
- nominal subtyping, 230–231, 245, 251. See also subtyping
- 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
O
- options, 50–51,
- for failure handling, 142–143, 197, 204
P
- 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
- 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
- through blocking queues, 349–354
- through lazy evaluation, 180–181
- pure functions, 21–23,
- versus actions, 24–25
Q
R
- reactive streams, 411–412, 415
- read-write locks, 338–339, 353–354
- 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
- referential transparency, 27–28. See also functional variables
- reverse list function, 90–91, 96
S
- 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
- sorting illustration, 92–94, 139, 381–383, 389
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
V
Z
- zip list function, 87–88
- zipper illustration, 56–59
- on trees, 169–172
- zipWith higher-order function, 388–389, 411
Fair Use Sources
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#)
Popular Functional Programming Languages (Haskell, Scala, Clojure, 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#. Data Oriented Programming, Functional C++, 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), Functional Programming Bibliography - Manning's Programming Functional in, Functional Programming Glossary, 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)
© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers
SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.