Skip to content

Typos in the text and URLs in the "Refactoring from the Imperative to the Functional Style" tutorial ( https://dev.java/learn/refactoring-to-functional-style/ ) #265

Description

@willy-b

Hello dev.java team!

Thanks again for all the content. While reading this tutorial I noticed that one of the URLs had a typo (in https://dev.java/learn/refactoring-to-functional-style/iteartionwithtransformation/ , "iteartionwithtransformation" should be "iterationwithtransformation" , with "iteration" instead of "iteartion") and some other small typos and grammar issues, that your team may be interested to fix.


In the latest version of https://dev.java/learn/refactoring-to-functional-style/iteartionwithtransformation/ (archived as is at https://web.archive.org/web/20260724022957/https://dev.java/learn/refactoring-to-functional-style/iteartionwithtransformation/ )

  • the URL has a typo:
    in https://dev.java/learn/refactoring-to-functional-style/iteartionwithtransformation/

    "iteartionwithtransformation" has "iteartion" instead of "iteration",

    so the URL should be https://dev.java/learn/refactoring-to-functional-style/iterationwithtransformation/

  • In the heading

    Converting Iteration with transformation

    "transformation" should also be capitalized "Transformation",
    and it is also inconsistent with the sidebar, which labels this section "Transforming while Iterating"

  • In the text

    Before refactoring the imperative style code above to the function style

    "to the function style" should be "to the functional style" to match the usage elsewhere in the article.

  • In the sentence

    The filter() function discards data that's not desired and passes on only the values we like to use.

    "we like to use" should be "we would like to use".


In the latest version of https://dev.java/learn/refactoring-to-functional-style/simpleloops/ (archived as is at https://web.archive.org/web/20260724014125/https://dev.java/learn/refactoring-to-functional-style/simpleloops/?nonce=1 )

  • In the sentence

    As you work with your code based, when you're ready to fix a bug or make an enhancement, you may find it useful to refactor some of the imperative style code to the functional style.

    "your code based" should be "your code base"


In the latest version of https://dev.java/learn/refactoring-to-functional-style/loopswithsteps/ (archived as is at https://web.archive.org/web/20260724020319/https://dev.java/learn/refactoring-to-functional-style/loopswithsteps/?nonce=2 )

  • In the sentence

    The second argument is a predicate that tells the value of the index variable, i, should not exceed the value of 15

"should not exceed the value of 15" should be "should be less than 15" (being equal to 15 is also excluded, as the predicate is i < 15).

  • In the sentence

    Here's a loop that uses step to skip a few values in the desired range:

    "step" should be "a step".


In the latest version of https://dev.java/learn/refactoring-to-functional-style/foreachwithif/ (archived as is at https://web.archive.org/web/20260724004844/https://dev.java/learn/refactoring-to-functional-style/foreachwithif/ )

  • In the sentence

    A slightly variation of this iteration, using stream(), is shown next.

    "slightly" should be "slight".


In the latest version of https://dev.java/learn/refactoring-to-functional-style/convertingtostreams/ (archived as is at https://web.archive.org/web/20260724023511/https://dev.java/learn/refactoring-to-functional-style/iteartionwithtransformation/?nonce=2 )

  • In the sentence

    Not only does the lines() method provide a stream of data over the contents of a file, it remove so much of the cruft around reading the lines.

    "remove" should be "removes".


Thanks very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions