Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String chunkBySize fails at runtime #1296

Closed
vasily-kirichenko opened this issue Dec 18, 2017 · 0 comments
Closed

String chunkBySize fails at runtime #1296

vasily-kirichenko opened this issue Dec 18, 2017 · 0 comments

Comments

@vasily-kirichenko
Copy link

open System
"fffff" |> Seq.chunkBySize 3 |> Seq.map String

According to fable.io, it compiles to

import { chunkBySize, map } from "fable-core/Seq";
map(function (arg00) {
  return arg00.join('');
}, chunkBySize(3, "fffff"));

The "Run" button does not work on fable.io, so I cannot test it there, but such code crashes at runtime in my app with

image

image

"fffff" |> Seq.chunkBySize 3 |> Seq.map String |> String.concat " " - does not work
"fffff".ToCharArray() |> Array.chunkBySize 3 |> Array.map String |> String.concat " " - works

In F# REPL both ^^ return the same value "fff ff".

@alfonsogarciacaro alfonsogarciacaro changed the title Seq.map String |> String.concat fails at runtime String chunkBySize fails at runtime Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant