Skip to content

Commit 211e94c

Browse files
committed
addressing edits and fixing some formatting
1 parent b7f3777 commit 211e94c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

app/pages/learn/01_tutorial/03_getting-to-know-the-language/03_refactoring_to_functional_style/00_refactoring.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
id: refactoring
33
title: "Refactoring from the Imperative to the Functional Style"
44
slug: learn/refactoring-to-functional-style
5-
slug_history:
6-
- refactoring
75
type: tutorial
86
category: language
97
category_order: 3
@@ -18,6 +16,7 @@ This part of the tutorial helps you to learn the functional style equivalent of
1816

1917
In this series we cover the following conversions from the imperative to the functional style:
2018

21-
| Description | Tutorial |Imperative Style | Functional Style Equivalent |
22-
| Simple `for` loop | link to simple loop tutorial | for | range or rangeClosed |
19+
| Tutorial |Imperative Style | Functional Style Equivalent |
20+
|------------------------------------------------------|-----------------|------------------------------|
21+
| [Converting Simple Loops](#refactoring.simple.loops) | `for()` | `range()` or `rangeClosed()` |
2322

app/pages/learn/01_tutorial/03_getting-to-know-the-language/03_refactoring_to_functional_style/01_converting_simple_loops.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
id: refactoring.simple.loops
33
title: Converting Simple Loops
44
slug: learn/refactoring-to-functional-style/simpleloops
5-
slug_history:
6-
- learn/converting-simple-loops-to-functional-style
75
type: tutorial-group
86
group: refactoring-to-functional-style
97
layout: learn/tutorial-group.html
@@ -14,7 +12,6 @@ toc:
1412
- Simple for Loops {simplefor}
1513
- Mappings {mappings}
1614
description: "Converting Simple Imperative Loops to Functional Style."
17-
author: ["Venkat Subramaniam"]
1815
last_update: 2023-07-06
1916
---
2017

@@ -93,7 +90,7 @@ Unlike the external iterator provided by the `for` loop, the code that uses the
9390
Proceed to look for opportunities in your own code base where you see the traditional `for` loop and modify it to using the `IntStream`'s `range` or `rangeClosed` method. Make sure you verify that the code works as expected after the change, preferably by running automated tests that you may already have.
9491

9592
<a id="mappings">&nbsp;</a>
96-
##Mappings
93+
## Mappings
9794

9895
Anywhere you see a simple `for` loop, you can use either the `range` or the `rangeClosed` method of `IntStream`. Use the `range` method if you want to iterate until but not including the ending value. Use the `rangeClosed` to include the ending value as well in your iteration.
9996

0 commit comments

Comments
 (0)