 
  		        dtonhofer
Functional Programming in Java, Second Edition: Chapter 9, p.165, "parallel streams"
A question to highlight is:
Is there a way to make sure that a stream is NOT parallel, and make this evident in the code?
As in:
stream
   .assertNotParallel()
   .map(x -> foo(x))...
The idea would be to make it clear to the next developer who comes along what NOT to try and to raise a runtime exception because some lambdas may not take kindly to a parallel stream.
There is also a warning about this scenarioin in Chapter 12, page 206, in “Avoid side-effects in functional pipelines”. Not every pipeline should or may be able to be parallelized.
Popular Pragmatic Bookshelf topics
                         
                      
                       
          
                page 20: … protoc command… 
I had to additionally run the following go get commands in order to be able to compile protobuf code using go...
              
            
            
          
              New
 
          
                Hi, 
build fails on: 
bracket-lib = “~0.8.1” 
when running on Mac Mini M1 Rust version 1.5.0: 
Compiling winit v0.22.2 
error[E0308]: mi...
              
            
            
          
              New
 
          
                In case this helps anyone, I’ve had issues setting up the rails source code. Here were the solutions: 
In Gemfile, change 
gem 'rails'
t...
              
            
            
          
              New
 
          
                Is the book’s epub format available to read on Google Play Books?
              
            
            
          
              New
 
          
                Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
              
            
            
          
              New
 
          
                On page 78 the following code appears: 
<%= link_to ‘Destroy’, product, 
class: ‘hover:underline’, 
method: :delete, 
data: { confirm...
              
            
            
          
              New
 
          
                It seems the second code snippet is missing the code to set the current_user: 
current_user: Accounts.get_user_by_session_token(session["...
              
            
            
          
              New
 
          
                Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. 
Before ...
              
            
            
          
              New
 
          
                Book: Programming Phoenix LiveView, page 142 (157/378), file lib/pento_web/live/product_live/form_component.ex, in the function below: 
d...
              
            
            
          
              New
 
          
                I’ve got to the end of Ch. 11, and the app runs, with all tabs displaying what they should – at first.  After switching around between St...
              
            
            
          
              New
Other popular topics
                         
                      
                       
          
                Which, if any, games do you play? On what platform? 
I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
              
            
            
          
              New
 
          
                I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
              
            
            
          
              New
 
          
                There’s a whole world of custom keycaps out there that I didn’t know existed! 
Check out all of our Keycaps threads here: 
https://forum....
              
            
            
          
              New
 
          
                Do the test and post your score :nerd_face: 
:keyboard: 
If possible, please add info such as the keyboard you’re using, the layout (Qw...
              
            
            
              
          
              New
 
          
                Biggest jackpot ever apparently! :upside_down_face: 
I don’t (usually) gamble/play the lottery, but working on a program to predict the...
              
            
            
          
              New
 
          
                Author Spotlight 
Erin Dees 
@undees 
Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
              
            
            
          
              New
 
          
                There appears to have been an update that has changed the terminology for what has previously been known as the Taskbar Overflow - this h...
              
            
            
          
              New
 
          
                Will Swifties’ war on AI fakes spark a deepfake porn reckoning? 
              
            
            
              
          
              New
 
          
                If you’re getting errors like this: 
psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
              
            
            
          
              New
 
          
                Fight complexity and reclaim the original spirit of agility by learning to simplify how you develop software. The result: a more humane a...
              
            
            
              
          
              New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /rails
- /js
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /elm
- /flutter
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /php
- /zig
- /deepseek
- /scala
- /lisp
- /textmate
- /sublime-text
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /django
- /revery
- /deno
- /ubuntu
- /spring
- /manjaro
- /nodejs
- /diversity
- /lua
- /julia
- /slackware
- /c
 
    





