IntStream rangeClosed unable to return value other than int












8














Why is this getting error? I thought map can return any value.



var s = IntStream.rangeClosed(1, 5).map(String::valueOf).collect(Collectors.toList());



| Error: | incompatible types: bad return type in method reference |
java.lang.String cannot be converted to int | var s =
IntStream.rangeClosed(1,
5).map(String::valueOf).collect(Collectors.toList()); |

^-------------^











share|improve this question





























    8














    Why is this getting error? I thought map can return any value.



    var s = IntStream.rangeClosed(1, 5).map(String::valueOf).collect(Collectors.toList());



    | Error: | incompatible types: bad return type in method reference |
    java.lang.String cannot be converted to int | var s =
    IntStream.rangeClosed(1,
    5).map(String::valueOf).collect(Collectors.toList()); |

    ^-------------^











    share|improve this question



























      8












      8








      8


      1





      Why is this getting error? I thought map can return any value.



      var s = IntStream.rangeClosed(1, 5).map(String::valueOf).collect(Collectors.toList());



      | Error: | incompatible types: bad return type in method reference |
      java.lang.String cannot be converted to int | var s =
      IntStream.rangeClosed(1,
      5).map(String::valueOf).collect(Collectors.toList()); |

      ^-------------^











      share|improve this question















      Why is this getting error? I thought map can return any value.



      var s = IntStream.rangeClosed(1, 5).map(String::valueOf).collect(Collectors.toList());



      | Error: | incompatible types: bad return type in method reference |
      java.lang.String cannot be converted to int | var s =
      IntStream.rangeClosed(1,
      5).map(String::valueOf).collect(Collectors.toList()); |

      ^-------------^








      java lambda java-8 java-stream






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 38 mins ago









      Nicholas K

      5,60151031




      5,60151031










      asked 41 mins ago









      Julez Jupiter

      164110




      164110
























          5 Answers
          5






          active

          oldest

          votes


















          7














          Use mapToObj:



          var s = IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());


          map of IntStream can only map an int value to another int value.



          mapToObj allows you to map an int value to a reference type, and thus transform the IntStream to a Stream<SomeReferenceType>.






          share|improve this answer























          • Thank you. It works like a charm.
            – Julez Jupiter
            39 mins ago



















          3














          Use mapToObj instead :



          IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());





          share|improve this answer





























            2














            Alternatively, you could use IntStream.boxed as :



            var s = IntStream.rangeClosed(1, 5) // IntStream
            .boxed() // Stream<Integer>
            .map(String::valueOf) // Stream<String>
            .collect(Collectors.toList());


            since the IntStream originally is a sequence of primitive int-values elements.



            Another variant of performing such an operation would be :



            var s = IntStream.rangeClosed(1, 5)
            .boxed()
            .map(a -> Integer.toString(a))
            .collect(Collectors.toList());





            share|improve this answer



















            • 2




              causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
              – Aomine
              34 mins ago





















            0














            While the aforementioned answers are correct and mapToObj is the idiomatic approach to proceed with, I think it's important to understand why the problem arises and thus in future cases, you'll know how to decipher the problem.



            So, let's go through the relevant stream pipeline operations:



            IntStream.range returns an IntStream as per the documentation:




            Returns a sequential ordered IntStream from startInclusive (inclusive)
            to endExclusive (exclusive) by an incremental step of 1.




            map returns an IntStream as per the documentation:




            Returns a stream consisting of the results of applying the given
            function to the elements of this stream.




            As well as that it's important to note that the method declaration for map is as follows:



            IntStream map(IntUnaryOperator mapper)


            i.e. it takes a IntUnaryOperator which in fact represents an operation on a single int-valued operand that produces an int-valued result.



            However, you're passing a function String::valueOf which consumes an int as we're dealing with an IntStream and returns a String thus not compliant with IntUnaryOperator and this is the cause of the problem.



            Whenever you want to take a primitive stream specialization and perform some mapping function and in turn yield a Stream<R> as a result then mapToObj is the way to go.



            mapToObj is declared as:



            mapToObj(IntFunction<? extends U> mapper)



            IntFunction represents a function that accepts an int-valued argument and produces a result and this result is of type R which means you'll have a Stream<R> after the mapToObj.





            share





























              -6














              17/12/18 9:50 p. m. - Ivan: ‎PTT-20181217-WA0003.opus (archivo adjunto) 18/12/18 12:46 p. m. - Ivan: Me encantas😍😍😍😍😍😍😍 18/12/18 12:46 p. m. - Ivan: Mi amor 18/12/18 12:47 p. m. - Ivan: Holaaaaaa 18/12/18 12:47 p. m. - Ivan: Chikita 18/12/18 12:47 p. m. - Ivan: Ey 18/12/18 12:47 p. m. - Ivan: Preciosa 21/12/18 12:07 a. m. - Ivan: Ey 21/12/18 12:10 a. m. - Ivan: . 21/12/18 1:13 a. m. - Amor😍: Que 21/12/18 1:22 a. m. - Ivan: Envés de que ables con migo 21/12/18 1:22 a. m. - Amor😍: Apenas me conecte 💁🏻‍♀ 21/12/18 1:22 a. m. - Ivan: Pues si y envés de ablar con migo ablas con otro bato 21/12/18 1:23 a. m. - Amor😍: No






              share|improve this answer








              New contributor




              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.


















              • Voting to delete as spam.
                – nullpointer
                17 mins ago











              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53984363%2fintstream-rangeclosed-unable-to-return-value-other-than-int%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              5 Answers
              5






              active

              oldest

              votes








              5 Answers
              5






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              7














              Use mapToObj:



              var s = IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());


              map of IntStream can only map an int value to another int value.



              mapToObj allows you to map an int value to a reference type, and thus transform the IntStream to a Stream<SomeReferenceType>.






              share|improve this answer























              • Thank you. It works like a charm.
                – Julez Jupiter
                39 mins ago
















              7














              Use mapToObj:



              var s = IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());


              map of IntStream can only map an int value to another int value.



              mapToObj allows you to map an int value to a reference type, and thus transform the IntStream to a Stream<SomeReferenceType>.






              share|improve this answer























              • Thank you. It works like a charm.
                – Julez Jupiter
                39 mins ago














              7












              7








              7






              Use mapToObj:



              var s = IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());


              map of IntStream can only map an int value to another int value.



              mapToObj allows you to map an int value to a reference type, and thus transform the IntStream to a Stream<SomeReferenceType>.






              share|improve this answer














              Use mapToObj:



              var s = IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());


              map of IntStream can only map an int value to another int value.



              mapToObj allows you to map an int value to a reference type, and thus transform the IntStream to a Stream<SomeReferenceType>.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 38 mins ago

























              answered 40 mins ago









              Eran

              279k37449535




              279k37449535












              • Thank you. It works like a charm.
                – Julez Jupiter
                39 mins ago


















              • Thank you. It works like a charm.
                – Julez Jupiter
                39 mins ago
















              Thank you. It works like a charm.
              – Julez Jupiter
              39 mins ago




              Thank you. It works like a charm.
              – Julez Jupiter
              39 mins ago













              3














              Use mapToObj instead :



              IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());





              share|improve this answer


























                3














                Use mapToObj instead :



                IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());





                share|improve this answer
























                  3












                  3








                  3






                  Use mapToObj instead :



                  IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());





                  share|improve this answer












                  Use mapToObj instead :



                  IntStream.rangeClosed(1, 5).mapToObj(String::valueOf).collect(Collectors.toList());






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 40 mins ago









                  Nicholas K

                  5,60151031




                  5,60151031























                      2














                      Alternatively, you could use IntStream.boxed as :



                      var s = IntStream.rangeClosed(1, 5) // IntStream
                      .boxed() // Stream<Integer>
                      .map(String::valueOf) // Stream<String>
                      .collect(Collectors.toList());


                      since the IntStream originally is a sequence of primitive int-values elements.



                      Another variant of performing such an operation would be :



                      var s = IntStream.rangeClosed(1, 5)
                      .boxed()
                      .map(a -> Integer.toString(a))
                      .collect(Collectors.toList());





                      share|improve this answer



















                      • 2




                        causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
                        – Aomine
                        34 mins ago


















                      2














                      Alternatively, you could use IntStream.boxed as :



                      var s = IntStream.rangeClosed(1, 5) // IntStream
                      .boxed() // Stream<Integer>
                      .map(String::valueOf) // Stream<String>
                      .collect(Collectors.toList());


                      since the IntStream originally is a sequence of primitive int-values elements.



                      Another variant of performing such an operation would be :



                      var s = IntStream.rangeClosed(1, 5)
                      .boxed()
                      .map(a -> Integer.toString(a))
                      .collect(Collectors.toList());





                      share|improve this answer



















                      • 2




                        causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
                        – Aomine
                        34 mins ago
















                      2












                      2








                      2






                      Alternatively, you could use IntStream.boxed as :



                      var s = IntStream.rangeClosed(1, 5) // IntStream
                      .boxed() // Stream<Integer>
                      .map(String::valueOf) // Stream<String>
                      .collect(Collectors.toList());


                      since the IntStream originally is a sequence of primitive int-values elements.



                      Another variant of performing such an operation would be :



                      var s = IntStream.rangeClosed(1, 5)
                      .boxed()
                      .map(a -> Integer.toString(a))
                      .collect(Collectors.toList());





                      share|improve this answer














                      Alternatively, you could use IntStream.boxed as :



                      var s = IntStream.rangeClosed(1, 5) // IntStream
                      .boxed() // Stream<Integer>
                      .map(String::valueOf) // Stream<String>
                      .collect(Collectors.toList());


                      since the IntStream originally is a sequence of primitive int-values elements.



                      Another variant of performing such an operation would be :



                      var s = IntStream.rangeClosed(1, 5)
                      .boxed()
                      .map(a -> Integer.toString(a))
                      .collect(Collectors.toList());






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 2 mins ago

























                      answered 37 mins ago









                      nullpointer

                      42.1k1089175




                      42.1k1089175








                      • 2




                        causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
                        – Aomine
                        34 mins ago
















                      • 2




                        causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
                        – Aomine
                        34 mins ago










                      2




                      2




                      causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
                      – Aomine
                      34 mins ago






                      causes unnecessary overhead, mapToObj is the idiomatic approach and the way to go.
                      – Aomine
                      34 mins ago













                      0














                      While the aforementioned answers are correct and mapToObj is the idiomatic approach to proceed with, I think it's important to understand why the problem arises and thus in future cases, you'll know how to decipher the problem.



                      So, let's go through the relevant stream pipeline operations:



                      IntStream.range returns an IntStream as per the documentation:




                      Returns a sequential ordered IntStream from startInclusive (inclusive)
                      to endExclusive (exclusive) by an incremental step of 1.




                      map returns an IntStream as per the documentation:




                      Returns a stream consisting of the results of applying the given
                      function to the elements of this stream.




                      As well as that it's important to note that the method declaration for map is as follows:



                      IntStream map(IntUnaryOperator mapper)


                      i.e. it takes a IntUnaryOperator which in fact represents an operation on a single int-valued operand that produces an int-valued result.



                      However, you're passing a function String::valueOf which consumes an int as we're dealing with an IntStream and returns a String thus not compliant with IntUnaryOperator and this is the cause of the problem.



                      Whenever you want to take a primitive stream specialization and perform some mapping function and in turn yield a Stream<R> as a result then mapToObj is the way to go.



                      mapToObj is declared as:



                      mapToObj(IntFunction<? extends U> mapper)



                      IntFunction represents a function that accepts an int-valued argument and produces a result and this result is of type R which means you'll have a Stream<R> after the mapToObj.





                      share


























                        0














                        While the aforementioned answers are correct and mapToObj is the idiomatic approach to proceed with, I think it's important to understand why the problem arises and thus in future cases, you'll know how to decipher the problem.



                        So, let's go through the relevant stream pipeline operations:



                        IntStream.range returns an IntStream as per the documentation:




                        Returns a sequential ordered IntStream from startInclusive (inclusive)
                        to endExclusive (exclusive) by an incremental step of 1.




                        map returns an IntStream as per the documentation:




                        Returns a stream consisting of the results of applying the given
                        function to the elements of this stream.




                        As well as that it's important to note that the method declaration for map is as follows:



                        IntStream map(IntUnaryOperator mapper)


                        i.e. it takes a IntUnaryOperator which in fact represents an operation on a single int-valued operand that produces an int-valued result.



                        However, you're passing a function String::valueOf which consumes an int as we're dealing with an IntStream and returns a String thus not compliant with IntUnaryOperator and this is the cause of the problem.



                        Whenever you want to take a primitive stream specialization and perform some mapping function and in turn yield a Stream<R> as a result then mapToObj is the way to go.



                        mapToObj is declared as:



                        mapToObj(IntFunction<? extends U> mapper)



                        IntFunction represents a function that accepts an int-valued argument and produces a result and this result is of type R which means you'll have a Stream<R> after the mapToObj.





                        share
























                          0












                          0








                          0






                          While the aforementioned answers are correct and mapToObj is the idiomatic approach to proceed with, I think it's important to understand why the problem arises and thus in future cases, you'll know how to decipher the problem.



                          So, let's go through the relevant stream pipeline operations:



                          IntStream.range returns an IntStream as per the documentation:




                          Returns a sequential ordered IntStream from startInclusive (inclusive)
                          to endExclusive (exclusive) by an incremental step of 1.




                          map returns an IntStream as per the documentation:




                          Returns a stream consisting of the results of applying the given
                          function to the elements of this stream.




                          As well as that it's important to note that the method declaration for map is as follows:



                          IntStream map(IntUnaryOperator mapper)


                          i.e. it takes a IntUnaryOperator which in fact represents an operation on a single int-valued operand that produces an int-valued result.



                          However, you're passing a function String::valueOf which consumes an int as we're dealing with an IntStream and returns a String thus not compliant with IntUnaryOperator and this is the cause of the problem.



                          Whenever you want to take a primitive stream specialization and perform some mapping function and in turn yield a Stream<R> as a result then mapToObj is the way to go.



                          mapToObj is declared as:



                          mapToObj(IntFunction<? extends U> mapper)



                          IntFunction represents a function that accepts an int-valued argument and produces a result and this result is of type R which means you'll have a Stream<R> after the mapToObj.





                          share












                          While the aforementioned answers are correct and mapToObj is the idiomatic approach to proceed with, I think it's important to understand why the problem arises and thus in future cases, you'll know how to decipher the problem.



                          So, let's go through the relevant stream pipeline operations:



                          IntStream.range returns an IntStream as per the documentation:




                          Returns a sequential ordered IntStream from startInclusive (inclusive)
                          to endExclusive (exclusive) by an incremental step of 1.




                          map returns an IntStream as per the documentation:




                          Returns a stream consisting of the results of applying the given
                          function to the elements of this stream.




                          As well as that it's important to note that the method declaration for map is as follows:



                          IntStream map(IntUnaryOperator mapper)


                          i.e. it takes a IntUnaryOperator which in fact represents an operation on a single int-valued operand that produces an int-valued result.



                          However, you're passing a function String::valueOf which consumes an int as we're dealing with an IntStream and returns a String thus not compliant with IntUnaryOperator and this is the cause of the problem.



                          Whenever you want to take a primitive stream specialization and perform some mapping function and in turn yield a Stream<R> as a result then mapToObj is the way to go.



                          mapToObj is declared as:



                          mapToObj(IntFunction<? extends U> mapper)



                          IntFunction represents a function that accepts an int-valued argument and produces a result and this result is of type R which means you'll have a Stream<R> after the mapToObj.






                          share











                          share


                          share










                          answered 7 mins ago









                          Aomine

                          39.4k73669




                          39.4k73669























                              -6














                              17/12/18 9:50 p. m. - Ivan: ‎PTT-20181217-WA0003.opus (archivo adjunto) 18/12/18 12:46 p. m. - Ivan: Me encantas😍😍😍😍😍😍😍 18/12/18 12:46 p. m. - Ivan: Mi amor 18/12/18 12:47 p. m. - Ivan: Holaaaaaa 18/12/18 12:47 p. m. - Ivan: Chikita 18/12/18 12:47 p. m. - Ivan: Ey 18/12/18 12:47 p. m. - Ivan: Preciosa 21/12/18 12:07 a. m. - Ivan: Ey 21/12/18 12:10 a. m. - Ivan: . 21/12/18 1:13 a. m. - Amor😍: Que 21/12/18 1:22 a. m. - Ivan: Envés de que ables con migo 21/12/18 1:22 a. m. - Amor😍: Apenas me conecte 💁🏻‍♀ 21/12/18 1:22 a. m. - Ivan: Pues si y envés de ablar con migo ablas con otro bato 21/12/18 1:23 a. m. - Amor😍: No






                              share|improve this answer








                              New contributor




                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.


















                              • Voting to delete as spam.
                                – nullpointer
                                17 mins ago
















                              -6














                              17/12/18 9:50 p. m. - Ivan: ‎PTT-20181217-WA0003.opus (archivo adjunto) 18/12/18 12:46 p. m. - Ivan: Me encantas😍😍😍😍😍😍😍 18/12/18 12:46 p. m. - Ivan: Mi amor 18/12/18 12:47 p. m. - Ivan: Holaaaaaa 18/12/18 12:47 p. m. - Ivan: Chikita 18/12/18 12:47 p. m. - Ivan: Ey 18/12/18 12:47 p. m. - Ivan: Preciosa 21/12/18 12:07 a. m. - Ivan: Ey 21/12/18 12:10 a. m. - Ivan: . 21/12/18 1:13 a. m. - Amor😍: Que 21/12/18 1:22 a. m. - Ivan: Envés de que ables con migo 21/12/18 1:22 a. m. - Amor😍: Apenas me conecte 💁🏻‍♀ 21/12/18 1:22 a. m. - Ivan: Pues si y envés de ablar con migo ablas con otro bato 21/12/18 1:23 a. m. - Amor😍: No






                              share|improve this answer








                              New contributor




                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.


















                              • Voting to delete as spam.
                                – nullpointer
                                17 mins ago














                              -6












                              -6








                              -6






                              17/12/18 9:50 p. m. - Ivan: ‎PTT-20181217-WA0003.opus (archivo adjunto) 18/12/18 12:46 p. m. - Ivan: Me encantas😍😍😍😍😍😍😍 18/12/18 12:46 p. m. - Ivan: Mi amor 18/12/18 12:47 p. m. - Ivan: Holaaaaaa 18/12/18 12:47 p. m. - Ivan: Chikita 18/12/18 12:47 p. m. - Ivan: Ey 18/12/18 12:47 p. m. - Ivan: Preciosa 21/12/18 12:07 a. m. - Ivan: Ey 21/12/18 12:10 a. m. - Ivan: . 21/12/18 1:13 a. m. - Amor😍: Que 21/12/18 1:22 a. m. - Ivan: Envés de que ables con migo 21/12/18 1:22 a. m. - Amor😍: Apenas me conecte 💁🏻‍♀ 21/12/18 1:22 a. m. - Ivan: Pues si y envés de ablar con migo ablas con otro bato 21/12/18 1:23 a. m. - Amor😍: No






                              share|improve this answer








                              New contributor




                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              17/12/18 9:50 p. m. - Ivan: ‎PTT-20181217-WA0003.opus (archivo adjunto) 18/12/18 12:46 p. m. - Ivan: Me encantas😍😍😍😍😍😍😍 18/12/18 12:46 p. m. - Ivan: Mi amor 18/12/18 12:47 p. m. - Ivan: Holaaaaaa 18/12/18 12:47 p. m. - Ivan: Chikita 18/12/18 12:47 p. m. - Ivan: Ey 18/12/18 12:47 p. m. - Ivan: Preciosa 21/12/18 12:07 a. m. - Ivan: Ey 21/12/18 12:10 a. m. - Ivan: . 21/12/18 1:13 a. m. - Amor😍: Que 21/12/18 1:22 a. m. - Ivan: Envés de que ables con migo 21/12/18 1:22 a. m. - Amor😍: Apenas me conecte 💁🏻‍♀ 21/12/18 1:22 a. m. - Ivan: Pues si y envés de ablar con migo ablas con otro bato 21/12/18 1:23 a. m. - Amor😍: No







                              share|improve this answer








                              New contributor




                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              share|improve this answer



                              share|improve this answer






                              New contributor




                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              answered 18 mins ago









                              Edgar Ivan Vivas

                              11




                              11




                              New contributor




                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.





                              New contributor





                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.






                              Edgar Ivan Vivas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.












                              • Voting to delete as spam.
                                – nullpointer
                                17 mins ago


















                              • Voting to delete as spam.
                                – nullpointer
                                17 mins ago
















                              Voting to delete as spam.
                              – nullpointer
                              17 mins ago




                              Voting to delete as spam.
                              – nullpointer
                              17 mins ago


















                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53984363%2fintstream-rangeclosed-unable-to-return-value-other-than-int%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Plaza Victoria

                              Puebla de Zaragoza

                              Musa