Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:29:44+00:00 2026-06-14T18:29:44+00:00

After reading this question , I would expect the following to work: Seq( Seq(1,2,3)

  • 0

After reading this question, I would expect the following to work:

Seq( Seq(1,2,3) , Seq(4,5,6) ).transpose()

but alas:

error: not enough arguments for method transpose: (implicit asTraversable: 
Seq[Int] => scala.collection.GenTraversableOnce[B])Seq[Seq[B]].
Unspecified value parameter asTraversable.
          Seq( Seq(1,2,3) , Seq(4,5,6) ).transpose()

Also, I can’t seem to find any reference to transpose on the scala docs, although Seq refers it

Providing the identity, it seems to work somehow:

scala> Seq( Seq(1,2,3) , Seq(4,5,6) ).transpose( a => a)
res10: Seq[Seq[Int]] = List(List(1, 4), List(2, 5), List(3, 6))

But still returns List instead of Seq

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:29:45+00:00Added an answer on June 14, 2026 at 6:29 pm

    Just use it without parentheses:

    Seq( Seq(1,2,3) , Seq(4,5,6) ).transpose
    //res0: Seq[Seq[Int]] = List(List(1, 4), List(2, 5), List(3, 6))
    

    But still returns List instead of Seq

    Well, actually List is inheritor of Seq, so after all you got a Seq (look at the left part of result).

    The reason of such behaviour is that transpose actually defined as a function with argument, but since it’s argument defined as implicit you have an option to delegate work of substituting argument to scala compiler (it will perform compile-time lookup for you).

    If you writing parentheses, either function has to have overloaded form with no arguments, e.g.

    def transpose() = ...
    

    or you have to write something inside them (it’s actually matter of syntax).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems to be an embarrassingly simple question, but, after a day of reading
Yes I know, this question has been asked MANY times but after reading all
After reading this question I just wondered whether it would be a good idea
After reading this very informative (albeit somewhat argumentative) question I would like to know
After reading this question, I need to clear up some things. IQueryable<Customer> custs =
After reading this question , i saw the answer by Naveen containing a link
After reading answer to this question: Make "make" default to "make -j 8" I
After reading and commenting on this question PHP Library for Keeping your site index
After reading this article on thedailywtf.com, I'm not sure that I really got the
After reading this SO question and noting the consensus about just how evil Thread.Sleep()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.